diff options
Diffstat (limited to 'vendor/gix')
60 files changed, 2429 insertions, 894 deletions
diff --git a/vendor/gix/.cargo-checksum.json b/vendor/gix/.cargo-checksum.json index 7f9d61a2f..132a163c0 100644 --- a/vendor/gix/.cargo-checksum.json +++ b/vendor/gix/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"CHANGELOG.md":"541c0f705d88cc3b56736404db055f64d0ce96285fd2996038d27fc2a4abdbf1","Cargo.lock":"283cdda178b0535db7f6c7bdda874cef1a0cbb914e44dff4d93e109f73d93bfa","Cargo.toml":"0d8e4b58298d5b7b69ab1534d0cf9a114862217d8e681935780a8272b53f8972","src/assets/baseline-init/HEAD":"28d25bf82af4c0e2b72f50959b2beb859e3e60b9630a5e8c603dad4ddb2b6e80","src/assets/baseline-init/description":"85ab6c163d43a17ea9cf7788308bca1466f1b0a8d1cc92e26e9bf63da4062aee","src/assets/baseline-init/hooks/applypatch-msg.sample":"64b47216779d705b5270e94970aa0bc7b96fd256af0a624e936f6b1b85a014db","src/assets/baseline-init/hooks/commit-msg.sample":"1f74d5e9292979b573ebd59741d46cb93ff391acdd083d340b94370753d92437","src/assets/baseline-init/hooks/fsmonitor-watchman.sample":"f3c0228d8e827f1c5260ac59fdd92c3d425c46e54711ef713c5a54ae0a4db2b4","src/assets/baseline-init/hooks/post-update.sample":"81765af2daef323061dcbc5e61fc16481cb74b3bac9ad8a174b186523586f6c5","src/assets/baseline-init/hooks/pre-applypatch.sample":"e99aee3f6ff6a07f775cab64af1c6507d46d20afa4a5a87fd3402d22b1de2797","src/assets/baseline-init/hooks/pre-commit.sample":"f9af7d95eb1231ecf2eba9770fedfa8d4797a12b02d7240e98d568201251244a","src/assets/baseline-init/hooks/pre-merge-commit.sample":"d3825a70337940ebbd0a5c072984e13245920cdf8898bd225c8d27a6dfc9cb53","src/assets/baseline-init/hooks/pre-push.sample":"4b1119e1e13a212571976f4aee77847cdbd40978546d6273a557e238981a40d1","src/assets/baseline-init/hooks/pre-rebase.sample":"3ac3a30cffe859b71a27d77a7fc1635d35ff5d5aaecc896bba11bd01e1b307ce","src/assets/baseline-init/hooks/pre-receive.sample":"a4c3d2b9c7bb3fd8d1441c31bd4ee71a595d66b44fcf49ddb310252320169989","src/assets/baseline-init/hooks/prepare-commit-msg.sample":"e9ddcaa4189fddd25ed97fc8c789eca7b6ca16390b2392ae3276f0c8e1aa4619","src/assets/baseline-init/hooks/update.sample":"978235ae8b913ab4d0f906a8af621a0bfe7c314d84b715f4f64ee9b1aa3cce2d","src/assets/baseline-init/info/exclude":"6671fe83b7a07c8932ee89164d1f2793b2318058eb8b98dc5c06ee0a5a3b0ec1","src/clone/checkout.rs":"b0f4f30d4041653836e8896a00f0a1def2e5625b9f8fa9fe19484aa858231373","src/clone/fetch/mod.rs":"35f0384ec6933739641fbdbe41ceb75e58a8deec73cfe4a5f20260e9649be366","src/clone/fetch/util.rs":"fa8f750881e6a8b5838b7fa3899d91ad4d68c8027f14901003e76274190374ad","src/clone/mod.rs":"16ea330e68b9ac9c39a0702deb5b3d70708cb09347a11e25085efcd6ea894457","src/commit.rs":"2f6c5b5e93702e9b9b731548970a9fe56f309f554f73238e837d05300e4f5a9b","src/config/cache/access.rs":"79e99df8b1ee365936812cfb59b92fb6e95f3a900de9f0193edde7f97b91f584","src/config/cache/incubate.rs":"089fcd2bfe0813b0607e019969d65c8ac314695ecbce832a5b36479df7f37126","src/config/cache/init.rs":"c7fd6613b2ea30d4dd28cf29989263eb5953da37661f0f552d717914a5ece443","src/config/cache/mod.rs":"3cce2cf0fafbc4f828870b85fef411a826ad6d1fe3ac5b6cbd2f5e049331aebf","src/config/cache/util.rs":"b94814e0aab3b300595ae19786333f3103294609ec848f4e761fd4b840fb87dd","src/config/mod.rs":"604efc0aae29cbea6306d761ca46ef18b75246ba514f6d70097caa958776041d","src/config/overrides.rs":"f9bd9b673ad78b9db98b169a05cd04d3aa6735e6e4a5bd621a2d4669fe2e8c58","src/config/snapshot/_impls.rs":"edae9b731c69828effbdfe01d32b7caa8c536df81d33de1cb67b88ece01a7218","src/config/snapshot/access.rs":"fc9b5df53f74627cb0d4f0bbcdb933ae9086394678929623dccb23f957fcfe91","src/config/snapshot/credential_helpers.rs":"690640166406598b0df5cc0dfa8c6a6d0051a897911e9fd5af56820dee7949a5","src/config/snapshot/mod.rs":"5377723de24b00ccb58e15df119831d7c0d9f2695f4499621db37546a5fccaff","src/config/tree/keys.rs":"11990d4d9581a2d182b40cbf7ef2cecd3694f3c127e996578b724c7981fe45d9","src/config/tree/mod.rs":"68de461ed67f1e36c87d14834dbc4700fc94b39d548708bf61d9effb1a55b1f6","src/config/tree/sections/author.rs":"a27cf6ad5150aa5ccbd64d2786183983e1567c094a221b016875864c9e8f6980","src/config/tree/sections/branch.rs":"105211bb0eefbdc718923d5e770261889163a5d61dc8f0c22af33473cfb32100","src/config/tree/sections/checkout.rs":"329ebe10cca7c5414f9e6229d6dce3178cdb5821a1b7e72bbfac3a60b5b42dc2","src/config/tree/sections/clone.rs":"9e0ea11063a5fa4059035a04d1531b3dc62cde48f487cddc56cd428f37b38931","src/config/tree/sections/committer.rs":"2f99b8bc6e2c4ad9bdba3a85bc6b717acb5b09d1ada2723d3ba5954f804368eb","src/config/tree/sections/core.rs":"98e06197a143fd06a014887dcc64279592cca5a138e285ec8f6a08d16a3b4787","src/config/tree/sections/credential.rs":"e1ce72dc24b9d2f06827b9fc6e8c963f888844ab5a4b48f6d867ad8542909b94","src/config/tree/sections/diff.rs":"b2bdfba61b34bc08c81d84b6b9e7ba009f8e0277f71e79393020d26c4112cde6","src/config/tree/sections/extensions.rs":"f73c444f2e2c8fbc8d1b1991c0d63532c792362e42833f3ae06059c07387cf66","src/config/tree/sections/gitoxide.rs":"731e41e042654aa2bb7dc0763aee97f81485ea79b846ac82b3b2dcb71d433578","src/config/tree/sections/http.rs":"58c9a9b8abcee4066eb4e20f9679dbbf888c04c21f4dbfff0d2ad7f0a18d4fcd","src/config/tree/sections/init.rs":"e87e33ac5091797bde302f78c8fb7cefce0fb1752610409c1db53c3f7b4179af","src/config/tree/sections/mod.rs":"0a5298653789a9d00f33a53f60bd7c27857f49d420748dbad48bc7d6ecb71fb6","src/config/tree/sections/pack.rs":"0a6dcdc7603b0d7a84159a70789b63b6c26d539f98808c520a8e644fc9dbd2f3","src/config/tree/sections/protocol.rs":"835f757720767099c5b9993c8c3962dfe93338155d6d0f6b7db12960df5e25de","src/config/tree/sections/remote.rs":"eb06d89125dc72b5754b642cf561e6e430cad4fbbd57dcd1049d306291afc41f","src/config/tree/sections/safe.rs":"4e96f49ff56d6ebb8944406fe2ae3c4a1fa80c5383f08935015ddc6036b583c3","src/config/tree/sections/ssh.rs":"7db83236912bcb7aa1770f0eb1a388ee0fac94c1548bd9a19051b34c25622841","src/config/tree/sections/url.rs":"e342edcd20979feaf54663a919a0751aaf32b4e1f2e47cf5d028faec62e6b731","src/config/tree/sections/user.rs":"8f02172a5db830832b4edf28693fdef33cece6ba1990c4d7a338e4c9291375ab","src/config/tree/traits.rs":"524f1752e9131c27db3a9016ee6c3abc61175345c2167426ffd5a41602cb950d","src/create.rs":"a12348ab9a503a4921accee6a58db46c5650cbbdfa3692f7ea54dce48707eb17","src/discover.rs":"d1ff7f43fb4c2b5303fc6c045bb65f68bb394a5c20e2bf36d8378c7a053ce785","src/env.rs":"57fb7c22af1eb6c719bb4651272793abf87400d3a24ae8b0a212f9e044e74cee","src/ext/mod.rs":"3c96daa11ca8321dedc9b968176e31f6e3626e4cd60f308ad46e2ec7fe586bde","src/ext/object_id.rs":"a70afd79c84731df0023d738332b3688a2adbcbdda802f8ee70297fc8fe0ca38","src/ext/reference.rs":"a51fe4f63e5708afa4fbabd13638b88c34845a64263db77308cd1b974a0f325f","src/ext/rev_spec.rs":"c196f21a3981b7ad84e9385ba3924a554accf9c7a3b4f8e2bba13cb74f108ec8","src/ext/tree.rs":"c4446627523e22c032c0e322e5daa35b3105bf68f6eaa45da84c590edb76420e","src/head/log.rs":"0de9d5f834b633756001bdd246e98266084d521d7f775537e6e6ead5ed93d7e4","src/head/mod.rs":"443c8f5129d2e92d893f53d4d6babc1ae1a79c88c1474738d35f2cc8aac98465","src/head/peel.rs":"039473b0ba6b77414b330115d855452a03ee9bc1c8b447ff2e310cbb45636cb9","src/id.rs":"c39eadc8cd9f46e951d2d9616ef8062409aec494872ea5f716f0ad9363986d85","src/init.rs":"84d97d8ca3f61cb87dfc99be1ee56ee53c6bdac75a741bd5c7bf995f7d5cb137","src/interrupt.rs":"f6aaa74d277900528f5628e483bddc9c821199ea06db39630e3f55ef93dc31e9","src/kind.rs":"84485be9dd514b8b91e104ee3e72944e062eaabf393291a1ac7e6a090104dbe8","src/lib.rs":"2bc758adf5a99afa3ebfda048f7d402e2d0b046c58fed7b9b1ed54aa243d8b42","src/mailmap.rs":"415301bdcb3d6991675c7ea86a92eea152cf65df7b2d14da4b58b3b605039e4e","src/object/blob.rs":"ae504ea412a4b0df0bb1d4e61655ed1d9f5654e1e586eedcf0d72fa1d20f7866","src/object/commit.rs":"6daa18b669950312582f42790011bc5782a8219d20de8bf35b0a2f0ef81d6902","src/object/errors.rs":"f1b322fbff0e400dfb153e67e7f6de1839ec488b53e552ac968545131a79ac74","src/object/impls.rs":"6b9f76d332da496148adaa9b5b5de5dcf98c3fd92deba245dd2e6c2a3895eb77","src/object/mod.rs":"7290e4cc7e071a9fba662e9eeff3c9dfbb1fdba71ba01bf125314d0426083b04","src/object/peel.rs":"c23ac9baac1216d9320c71926f56548d18f7f3964bdbcccd8ca81f6b756f7ad9","src/object/tag.rs":"8915013ff2b2f593cb7cba5fd3f77beef9792ac17cd2afa60d216da104e7863e","src/object/tree/diff/change.rs":"95df7e1fb3b58fa2a0086f205c39940fb590ccdac92aee53a6cff5f29181f30c","src/object/tree/diff/for_each.rs":"419e83b0dfc6b2c9ee7e14489513f1979a3a6d46fa4e03e212f57d8aa90af60f","src/object/tree/diff/mod.rs":"2bdb1e9f10af7a163c776d26ebd9841e7b3d635dd0e8ea63815339926eaf0b7e","src/object/tree/diff/rewrites.rs":"582c5de23ce61dfe5b7bd76ac495d71a1f46b0831c5cffc1fe5c52be704217af","src/object/tree/diff/tracked.rs":"4dd20f5e2c3c577a1f51a0fd9cdcb4d40c8824f943439402bdeaef34fd0b00a6","src/object/tree/iter.rs":"4e54d72fce5a5bc9299ea36147dd2d95d3d25d34d97dd5d663e7ce0eb87b1f13","src/object/tree/mod.rs":"bf64586b62d74dfa2f128a06d61a3d22d230b60e21a44338e89fb8982d052322","src/object/tree/traverse.rs":"ae0342857d42b6afb82167423dfdac9611ce1b7281b6b9b542e230960c564c0f","src/open/mod.rs":"12b28d68fc9b85e40f61e3323d9cabcba0f691099586a553b8bf72e8c9ce1a39","src/open/options.rs":"955a2837697c4545f806dd640142f796ab5accaf8dcad36b806e324a5361ddb8","src/open/repository.rs":"9e99f89d4b34a348f565689b8ca41d99064330e80b6e7ca76272ded0abacc67c","src/path.rs":"3cd4c92a626384f8f4db89b2f7594923b922d7b841681c167748a01abc7dc3f7","src/reference/edits.rs":"df762921fa815470a23bd884e0b1677b5f4705d2b2aaef8f59c0ed759c1ce6cb","src/reference/errors.rs":"6c7e624031b8c09f2011ca30afa487c20487218e4ece6cf34892e8f693f22901","src/reference/iter.rs":"645ebf083877a73c05202e8b79489e19fad290e1e6e41b7d817e08307e2822c3","src/reference/log.rs":"95b3e85dde8ca06251c15756ad3b54eeb48804ac6718ec4634f367091bd42b80","src/reference/mod.rs":"e0cad649928296e68df1b89119a35814ac4c6887957f7cdf644113b59fd74645","src/reference/remote.rs":"a739c6e1c9b8fd61607fdcd3cb25a1d6c80bb81930e2258d1ba4f92d79bf3e66","src/remote/access.rs":"76e75baca0155710c2eea0e439df0774ecb0cd6c7e6b950876dd9e6e75be5e9f","src/remote/build.rs":"773a10e61826a4976b872ae2922f723c55174e0ed4c0b941ab8034bc33b314cc","src/remote/connect.rs":"181a7fc0510a4da3a4be4245f9a80e6d90115298aad23dc1bf8aa4e746ff6dcb","src/remote/connection/access.rs":"728d8c7e4ce2669c59b0737cfd2f8faf4983716ae105b3bf8d3d8b99660b105d","src/remote/connection/fetch/config.rs":"93b1392fdc409dba073e96272f13ad7ab996522d59df819edc800431ee36975b","src/remote/connection/fetch/error.rs":"19df1a6b367fcc8b77a8a05a4fb87a816303ae1260f7d98f03992920fb0de651","src/remote/connection/fetch/mod.rs":"78625af01154e8f2a8e7017ed7c8507276031b430efc1ee50b9b2ad07d3a6e41","src/remote/connection/fetch/negotiate.rs":"d8a6774c66eeee9380d2f3edbeacf927bf800303bd57dc85e1dc498e9e80f873","src/remote/connection/fetch/receive_pack.rs":"293e0feb816c64c136bffea7d5a77b3971df11aaf7b0a37dad0f9fd9d111474a","src/remote/connection/fetch/update_refs/mod.rs":"a1e93355795ee0b4ca28946fc464dcd29af460b3f37b4376b7e31760050805af","src/remote/connection/fetch/update_refs/tests.rs":"f9c197bf7ba8528c888d486bdc9d43c42181e3087f15bb0416514a38a5ec8dbe","src/remote/connection/fetch/update_refs/update.rs":"069156a6fcebd0eab64d1f816eae6612bc5d0523f3dae05e69ece40a23c00a95","src/remote/connection/mod.rs":"ca0216eca9ad853c875d764d8e7cbad757f1047d70aaacd3994f78d35facf2e6","src/remote/connection/ref_map.rs":"e17ae194281232f51716dcc7f3dab208a1eb85856a902099bb0da364e85e5bd8","src/remote/errors.rs":"148318b54894fddf1eee58bbb622861122fcd5d6b6a9470083779945f75c3257","src/remote/fetch.rs":"49ede72db851d21144fa676508ea4f5456fcfb9ee00b9ea432462a69e325fca0","src/remote/init.rs":"519adc4da7ca2739697bd4e48d0100458a146c8cb71069b8a6a721198199d3d9","src/remote/mod.rs":"14a1532470cc76cf3b727657439923f3515dd781ebfc7030d9481056c6bbf162","src/remote/name.rs":"9fa7e81a157375ecb40ddfba5da850fef7513296a68014a50f5148d57f40b8b7","src/remote/save.rs":"7e96e890bcd4dc85a866d0db08e68d27ea183e0e6446a2aa46bed3379d2e4335","src/remote/url/mod.rs":"a3279f5330fc83193e583f2b839ab08006c293b0040db6cc74969d50813fbbaa","src/remote/url/rewrite.rs":"4d43167909020458abc5e3e7310e3efaddb9fc7c783581fbc9422fa8b057d95d","src/remote/url/scheme_permission.rs":"4f6e528260c67af54171477d97707050f048c0c35e77f088f8ddc4ae135e6386","src/repository/cache.rs":"72d41c8f90d2e49c10b884582613fa5941ea0e1d15cc7d0a4d0d7be0b0243d4d","src/repository/config/mod.rs":"02d1a3d68c6a21b0fb7e199f69d7e7641645afa5710e9843a922a040d9422d27","src/repository/config/transport.rs":"cb163133228cb4d75c140b747fdc132b4512bd5b86b10f70bd8cd8f9a432859f","src/repository/identity.rs":"81d368f2b7d65800bf93d623f130ddb44a8d9e965cdd9757455733d31f92d483","src/repository/impls.rs":"ad0296fa71d1253eaceb71cd5dbe73c6204d245d2f1c7a9cc01e7279b678d1fd","src/repository/init.rs":"738f53abc0fdb3189ebe7cf0092d18907d3cb8cd0304af0b68077395a337ebec","src/repository/location.rs":"a5d30567442837259cf718e9f8f26633a17c997476669e15e5d3cd410b3b9971","src/repository/mod.rs":"6fbe6f3e768402c728920118dfa1290f4800544de5cbbd0cb56de1008dcca186","src/repository/object.rs":"18e3218efd301c1c3198134bee57c4e4450a15a929352cfd058779a32c70e40e","src/repository/permissions.rs":"d2c8589667c746baef86533a70a8a6705fc93de3200bfd4874fcf5b0788fa66e","src/repository/reference.rs":"c37e556966dd4308bc8b5784484612d9d62a438a443d1d667374ed604b238f5e","src/repository/remote.rs":"936f6a5e4b7d7a7bfe974c287e1f8fff4a2935d4020c6156bc469b74e84bd861","src/repository/revision.rs":"66126940c3a94776d94b901c14078d5b749723c3c0ed8500639edfe37aaa97da","src/repository/snapshots.rs":"f99ca2e7d1bb3d1fff9d3df2d36b979c57197fcbbb633090edb0319d43873fa2","src/repository/state.rs":"040cca4a26463211aef85e4539d084969240f30d985c1bd3ae9bb3cd01009d1d","src/repository/thread_safe.rs":"ea2f5d07958d3fad08cba5028d18901a99088d3c1fc56934e3e01b0c4ea37c39","src/repository/worktree.rs":"d0a804df89684c61c3d1919a42e0855a4277decbd0f3babaaa9627b23aa436ad","src/revision/mod.rs":"a466315d4aea646ddba99c54f9ae118431b56dafbca6d0462ebabca3695d027d","src/revision/spec/mod.rs":"aa1516ed667a49bfa0db55fdea0bfbcc3227411be105496f0867bd7efb5d5dda","src/revision/spec/parse/delegate/mod.rs":"bfe787c5c881b5e4acf4bbcb79d966b8a92e56e8b2d20525bf0c0cd6ba0a0b8d","src/revision/spec/parse/delegate/navigate.rs":"b182bca82031b4ecfd4c36bcc48599a67a247b4e785591e85933eef50e428ff2","src/revision/spec/parse/delegate/revision.rs":"51ff36007b7376305cfcf8acbacc53ddb72796aceec8b761f4d1f1843554487c","src/revision/spec/parse/error.rs":"48c0c2e7dcffe80aac5563094787e0502c4275619fc35467a2687499bbad0fef","src/revision/spec/parse/mod.rs":"141e591acacfce8cc8d11c5b72d18c8d05baad1b21dead0d8e7242f4963410b7","src/revision/spec/parse/types.rs":"c84d3af2c9f215a375c7b50a7251377c9aca5c09c16ab3afd0af1d25a22d7d89","src/revision/walk.rs":"dd9ceebcbd4560b8c3b6390af29f7d8029eefb6cd82b7b8f947257dea420af51","src/tag.rs":"f60043aaa7afb54652ab6cf64765ebd61607f19a83dd5960abf8077d2cb91d44","src/types.rs":"af0f1a55a39255dca57a87951aa7bab9d9e90d3adffcda7c956917dffce1901b","src/worktree/mod.rs":"2b430fb1f74d625dbf1b6e3e9ddcd50037fdac52dbeb7bd9988b5c7d32aa9a09","src/worktree/proxy.rs":"07ff3cfc6a8f326fb7d62f6762f682498e9e5f131ece935acfd26b5223a338f1"},"package":"dabfac58aecb4a38cdd2568de66eb1f0d968fd6726f5a80cb8bea7944ef10cc0"}
\ No newline at end of file +{"files":{"CHANGELOG.md":"837f91e546ec4ce70d2f08e7d564b6a49b7ce7bf6cc8621c3d19028e8199e2aa","Cargo.lock":"0bdec0596a9b90e766d89b9015d9c840c22b6e49db3c3ded74d55614e360b128","Cargo.toml":"5034fd9daf9cb689f13dde47c4303166881c7f454c4c288adb28a1d0f637f960","src/assets/baseline-init/HEAD":"28d25bf82af4c0e2b72f50959b2beb859e3e60b9630a5e8c603dad4ddb2b6e80","src/assets/baseline-init/description":"85ab6c163d43a17ea9cf7788308bca1466f1b0a8d1cc92e26e9bf63da4062aee","src/assets/baseline-init/hooks/applypatch-msg.sample":"64b47216779d705b5270e94970aa0bc7b96fd256af0a624e936f6b1b85a014db","src/assets/baseline-init/hooks/commit-msg.sample":"1f74d5e9292979b573ebd59741d46cb93ff391acdd083d340b94370753d92437","src/assets/baseline-init/hooks/fsmonitor-watchman.sample":"f3c0228d8e827f1c5260ac59fdd92c3d425c46e54711ef713c5a54ae0a4db2b4","src/assets/baseline-init/hooks/post-update.sample":"81765af2daef323061dcbc5e61fc16481cb74b3bac9ad8a174b186523586f6c5","src/assets/baseline-init/hooks/pre-applypatch.sample":"e99aee3f6ff6a07f775cab64af1c6507d46d20afa4a5a87fd3402d22b1de2797","src/assets/baseline-init/hooks/pre-commit.sample":"f9af7d95eb1231ecf2eba9770fedfa8d4797a12b02d7240e98d568201251244a","src/assets/baseline-init/hooks/pre-merge-commit.sample":"d3825a70337940ebbd0a5c072984e13245920cdf8898bd225c8d27a6dfc9cb53","src/assets/baseline-init/hooks/pre-push.sample":"4b1119e1e13a212571976f4aee77847cdbd40978546d6273a557e238981a40d1","src/assets/baseline-init/hooks/pre-rebase.sample":"3ac3a30cffe859b71a27d77a7fc1635d35ff5d5aaecc896bba11bd01e1b307ce","src/assets/baseline-init/hooks/pre-receive.sample":"a4c3d2b9c7bb3fd8d1441c31bd4ee71a595d66b44fcf49ddb310252320169989","src/assets/baseline-init/hooks/prepare-commit-msg.sample":"e9ddcaa4189fddd25ed97fc8c789eca7b6ca16390b2392ae3276f0c8e1aa4619","src/assets/baseline-init/hooks/update.sample":"978235ae8b913ab4d0f906a8af621a0bfe7c314d84b715f4f64ee9b1aa3cce2d","src/assets/baseline-init/info/exclude":"6671fe83b7a07c8932ee89164d1f2793b2318058eb8b98dc5c06ee0a5a3b0ec1","src/attributes.rs":"af39ccaf9438b1b832808e7758610876cabda0c137d1e8cb6d1ecb7ef3121ce0","src/clone/access.rs":"18b922c8df27095570109df5a64f2f348a549a50e362c243d3f4f9b74cd60a9d","src/clone/checkout.rs":"82ebd7de88815b5975e00f4740114f77ed78441c31eb42a74b6213eb5acf0798","src/clone/fetch/mod.rs":"8678c4aa399b3c51e36e45e4c5a3205c00811064bb9c2927ef681c252cad3951","src/clone/fetch/util.rs":"fa8f750881e6a8b5838b7fa3899d91ad4d68c8027f14901003e76274190374ad","src/clone/mod.rs":"074d261755c56b082d3f4c000ff459b05fdf472cb749f48b9c13b6a74bb1ef10","src/commit.rs":"0e28a1dd18cee6088b8a031b070139db21ee7807109953e735bb75de11c56311","src/config/cache/access.rs":"e8a66d9c038e5401e49ffad7119448d18195bacdc8a14aaadda5d9f9c38df805","src/config/cache/incubate.rs":"babac6fef1f7ecec4bc5549a29db82857621de8e81e209ea0efd342783d3d88d","src/config/cache/init.rs":"9e459edc90432f82ffd89c9bfbf6978b9273e95935c0f173ba8ac8c2d4b4053c","src/config/cache/mod.rs":"3cce2cf0fafbc4f828870b85fef411a826ad6d1fe3ac5b6cbd2f5e049331aebf","src/config/cache/util.rs":"b10aa70d3523cfcc0cfe1e7814427c04c16117b0e96446cf9e26b9151c8f0640","src/config/mod.rs":"c69a09b43c4e8f4d52ef016ad9b7f940be385dfc9b05f5671b6f6b00b047a862","src/config/overrides.rs":"f9bd9b673ad78b9db98b169a05cd04d3aa6735e6e4a5bd621a2d4669fe2e8c58","src/config/snapshot/_impls.rs":"edae9b731c69828effbdfe01d32b7caa8c536df81d33de1cb67b88ece01a7218","src/config/snapshot/access.rs":"fc9b5df53f74627cb0d4f0bbcdb933ae9086394678929623dccb23f957fcfe91","src/config/snapshot/credential_helpers.rs":"690640166406598b0df5cc0dfa8c6a6d0051a897911e9fd5af56820dee7949a5","src/config/snapshot/mod.rs":"5377723de24b00ccb58e15df119831d7c0d9f2695f4499621db37546a5fccaff","src/config/tree/keys.rs":"11990d4d9581a2d182b40cbf7ef2cecd3694f3c127e996578b724c7981fe45d9","src/config/tree/mod.rs":"af0255337243ffd45613967d74d234215750cfc9abb94d2e02360385f6aef268","src/config/tree/sections/author.rs":"a27cf6ad5150aa5ccbd64d2786183983e1567c094a221b016875864c9e8f6980","src/config/tree/sections/branch.rs":"105211bb0eefbdc718923d5e770261889163a5d61dc8f0c22af33473cfb32100","src/config/tree/sections/checkout.rs":"329ebe10cca7c5414f9e6229d6dce3178cdb5821a1b7e72bbfac3a60b5b42dc2","src/config/tree/sections/clone.rs":"bbc86890044721ac34ae7610b14987035ab8714c856cec2787fae49c286a6d6d","src/config/tree/sections/committer.rs":"2f99b8bc6e2c4ad9bdba3a85bc6b717acb5b09d1ada2723d3ba5954f804368eb","src/config/tree/sections/core.rs":"98e06197a143fd06a014887dcc64279592cca5a138e285ec8f6a08d16a3b4787","src/config/tree/sections/credential.rs":"e1ce72dc24b9d2f06827b9fc6e8c963f888844ab5a4b48f6d867ad8542909b94","src/config/tree/sections/diff.rs":"b2bdfba61b34bc08c81d84b6b9e7ba009f8e0277f71e79393020d26c4112cde6","src/config/tree/sections/extensions.rs":"f73c444f2e2c8fbc8d1b1991c0d63532c792362e42833f3ae06059c07387cf66","src/config/tree/sections/gitoxide.rs":"e8104152d0c70c7f266c14cd8cda865bcaff77ba192b82202329c69b4d6177a3","src/config/tree/sections/http.rs":"58c9a9b8abcee4066eb4e20f9679dbbf888c04c21f4dbfff0d2ad7f0a18d4fcd","src/config/tree/sections/index.rs":"e54978e4c34a8c50345950f0b5adbfc8856ac636dc22cd1702bc4891322af8ca","src/config/tree/sections/init.rs":"e87e33ac5091797bde302f78c8fb7cefce0fb1752610409c1db53c3f7b4179af","src/config/tree/sections/mod.rs":"80fe0f8889922ce0e6481c4445c92f4fcd3675eef4328288b1bfeb4c54b15566","src/config/tree/sections/pack.rs":"0a6dcdc7603b0d7a84159a70789b63b6c26d539f98808c520a8e644fc9dbd2f3","src/config/tree/sections/protocol.rs":"835f757720767099c5b9993c8c3962dfe93338155d6d0f6b7db12960df5e25de","src/config/tree/sections/remote.rs":"eb06d89125dc72b5754b642cf561e6e430cad4fbbd57dcd1049d306291afc41f","src/config/tree/sections/safe.rs":"4e96f49ff56d6ebb8944406fe2ae3c4a1fa80c5383f08935015ddc6036b583c3","src/config/tree/sections/ssh.rs":"7db83236912bcb7aa1770f0eb1a388ee0fac94c1548bd9a19051b34c25622841","src/config/tree/sections/url.rs":"e342edcd20979feaf54663a919a0751aaf32b4e1f2e47cf5d028faec62e6b731","src/config/tree/sections/user.rs":"8f02172a5db830832b4edf28693fdef33cece6ba1990c4d7a338e4c9291375ab","src/config/tree/traits.rs":"524f1752e9131c27db3a9016ee6c3abc61175345c2167426ffd5a41602cb950d","src/create.rs":"0cba6d6381cd75482d28b3be5e008513197eb3d8565f540330f2458dd3ade472","src/diff.rs":"52bc752a2a8decff56b7a41d1ae97b90c0f3422332f999ced67fc884d6b25d18","src/discover.rs":"d1ff7f43fb4c2b5303fc6c045bb65f68bb394a5c20e2bf36d8378c7a053ce785","src/env.rs":"57fb7c22af1eb6c719bb4651272793abf87400d3a24ae8b0a212f9e044e74cee","src/ext/mod.rs":"3c96daa11ca8321dedc9b968176e31f6e3626e4cd60f308ad46e2ec7fe586bde","src/ext/object_id.rs":"a70afd79c84731df0023d738332b3688a2adbcbdda802f8ee70297fc8fe0ca38","src/ext/reference.rs":"a51fe4f63e5708afa4fbabd13638b88c34845a64263db77308cd1b974a0f325f","src/ext/rev_spec.rs":"c196f21a3981b7ad84e9385ba3924a554accf9c7a3b4f8e2bba13cb74f108ec8","src/ext/tree.rs":"c4446627523e22c032c0e322e5daa35b3105bf68f6eaa45da84c590edb76420e","src/head/log.rs":"0de9d5f834b633756001bdd246e98266084d521d7f775537e6e6ead5ed93d7e4","src/head/mod.rs":"443c8f5129d2e92d893f53d4d6babc1ae1a79c88c1474738d35f2cc8aac98465","src/head/peel.rs":"039473b0ba6b77414b330115d855452a03ee9bc1c8b447ff2e310cbb45636cb9","src/id.rs":"32ceeb77b52f47b4cc114789cadf78b4700121d10909a9e5be7f6ea021ccbd94","src/init.rs":"84d97d8ca3f61cb87dfc99be1ee56ee53c6bdac75a741bd5c7bf995f7d5cb137","src/interrupt.rs":"f6aaa74d277900528f5628e483bddc9c821199ea06db39630e3f55ef93dc31e9","src/kind.rs":"84485be9dd514b8b91e104ee3e72944e062eaabf393291a1ac7e6a090104dbe8","src/lib.rs":"e8d1aef0cd6aa2af2ba119c152e6ec4c8a803ba0b80f8aa99c609d5bb235d89e","src/mailmap.rs":"415301bdcb3d6991675c7ea86a92eea152cf65df7b2d14da4b58b3b605039e4e","src/object/blob.rs":"ae504ea412a4b0df0bb1d4e61655ed1d9f5654e1e586eedcf0d72fa1d20f7866","src/object/commit.rs":"d969468a537f8c509b708e9d2403da33ca1ac1442543589e683d080cefe66237","src/object/errors.rs":"f1b322fbff0e400dfb153e67e7f6de1839ec488b53e552ac968545131a79ac74","src/object/impls.rs":"6b9f76d332da496148adaa9b5b5de5dcf98c3fd92deba245dd2e6c2a3895eb77","src/object/mod.rs":"158263fe6f6a8db6ecebc741dac012a517508d5041e70909228e1c0ae9cee1c7","src/object/peel.rs":"c23ac9baac1216d9320c71926f56548d18f7f3964bdbcccd8ca81f6b756f7ad9","src/object/tag.rs":"b40e2b908de9dd500d297f1bcbd969facfe7beadcf62cc6a7cb975169f2da8be","src/object/tree/diff/change.rs":"95df7e1fb3b58fa2a0086f205c39940fb590ccdac92aee53a6cff5f29181f30c","src/object/tree/diff/for_each.rs":"419e83b0dfc6b2c9ee7e14489513f1979a3a6d46fa4e03e212f57d8aa90af60f","src/object/tree/diff/mod.rs":"980ec8425e9783a445d06d1a81b7a7f0cd05798a84a9ce2c7d7506e9c5912259","src/object/tree/diff/rewrites.rs":"582c5de23ce61dfe5b7bd76ac495d71a1f46b0831c5cffc1fe5c52be704217af","src/object/tree/diff/tracked.rs":"4dd20f5e2c3c577a1f51a0fd9cdcb4d40c8824f943439402bdeaef34fd0b00a6","src/object/tree/iter.rs":"4e54d72fce5a5bc9299ea36147dd2d95d3d25d34d97dd5d663e7ce0eb87b1f13","src/object/tree/mod.rs":"9d09e9fa8ad9a41b969b8f682447a5ad889a5ff713b53492e05302007ae2b252","src/object/tree/traverse.rs":"ae0342857d42b6afb82167423dfdac9611ce1b7281b6b9b542e230960c564c0f","src/open/mod.rs":"d25c11246536e7d57172b375569bd8545b8060f13bbfbc49cbf0f85636627076","src/open/options.rs":"697287cb2715d4a27353dbf7745ff381edd19f062ddd73e14b54f5e11c36d022","src/open/permissions.rs":"9f7f41fd250d043cea7ee6ff0cdc315838dbb6226bde3dca2a7666f01d648090","src/open/repository.rs":"82ff400bf75515f2f0c3ff33e5213e8020167bbaec86f8e2d97f239b2924d233","src/path.rs":"3cd4c92a626384f8f4db89b2f7594923b922d7b841681c167748a01abc7dc3f7","src/prelude.rs":"8dc6fa25bb01fbc1e012364949982e406b17ab22bde464e154f12286fba293cf","src/progress.rs":"a9ba8ec6cc21eea78121b02d1feaba8f6aab04be441bfe8be9f3dffe4c5e0ba5","src/reference/edits.rs":"df762921fa815470a23bd884e0b1677b5f4705d2b2aaef8f59c0ed759c1ce6cb","src/reference/errors.rs":"6c7e624031b8c09f2011ca30afa487c20487218e4ece6cf34892e8f693f22901","src/reference/iter.rs":"645ebf083877a73c05202e8b79489e19fad290e1e6e41b7d817e08307e2822c3","src/reference/log.rs":"95b3e85dde8ca06251c15756ad3b54eeb48804ac6718ec4634f367091bd42b80","src/reference/mod.rs":"e0cad649928296e68df1b89119a35814ac4c6887957f7cdf644113b59fd74645","src/reference/remote.rs":"a739c6e1c9b8fd61607fdcd3cb25a1d6c80bb81930e2258d1ba4f92d79bf3e66","src/remote/access.rs":"76e75baca0155710c2eea0e439df0774ecb0cd6c7e6b950876dd9e6e75be5e9f","src/remote/build.rs":"773a10e61826a4976b872ae2922f723c55174e0ed4c0b941ab8034bc33b314cc","src/remote/connect.rs":"af2e24be8d7849b9b6e465a5b316839007e32a4b5fb5f4e5d8beddd778f76bfe","src/remote/connection/access.rs":"eed8a3f17a964cf7e4aff8b4b1fae950c6cf83e1843e23e70a4bdb0acdd53ed7","src/remote/connection/fetch/config.rs":"93b1392fdc409dba073e96272f13ad7ab996522d59df819edc800431ee36975b","src/remote/connection/fetch/error.rs":"976dc4466b84235e3e089bf404b28700d4b1f877981b2506706fbf60ad0db326","src/remote/connection/fetch/mod.rs":"68233e0bf563d4fa8ea8edd5e4ef06491af96a1b5d7a51e74971dd3621fef738","src/remote/connection/fetch/negotiate.rs":"ff6b7e450bf8904ec65beee763d69a695e8244e97b340148e43af79334275b4c","src/remote/connection/fetch/receive_pack.rs":"de750ecb330553cb3ed4d84675d09949165b79debc9a6b91f12da857cb5decdd","src/remote/connection/fetch/update_refs/mod.rs":"a1e93355795ee0b4ca28946fc464dcd29af460b3f37b4376b7e31760050805af","src/remote/connection/fetch/update_refs/tests.rs":"f9c197bf7ba8528c888d486bdc9d43c42181e3087f15bb0416514a38a5ec8dbe","src/remote/connection/fetch/update_refs/update.rs":"069156a6fcebd0eab64d1f816eae6612bc5d0523f3dae05e69ece40a23c00a95","src/remote/connection/mod.rs":"863f4a7f2476f5b5d8622959d5069424decea29ba7f66619f679344e6fb5a5d1","src/remote/connection/ref_map.rs":"2721c1dfaa3e00582de03adc98216a90e5d5e67a142c673971b9a5a6dd92a0aa","src/remote/errors.rs":"148318b54894fddf1eee58bbb622861122fcd5d6b6a9470083779945f75c3257","src/remote/fetch.rs":"12843f5bc136d04685cae253defbedbb78ac5ae687e92b633d3c130baaa7f21b","src/remote/init.rs":"519adc4da7ca2739697bd4e48d0100458a146c8cb71069b8a6a721198199d3d9","src/remote/mod.rs":"14a1532470cc76cf3b727657439923f3515dd781ebfc7030d9481056c6bbf162","src/remote/name.rs":"9fa7e81a157375ecb40ddfba5da850fef7513296a68014a50f5148d57f40b8b7","src/remote/save.rs":"3c42980bd6632a1763bbd3b34d488f0c9eeec9ebcefae2e727d20bafd42508a5","src/remote/url/mod.rs":"a3279f5330fc83193e583f2b839ab08006c293b0040db6cc74969d50813fbbaa","src/remote/url/rewrite.rs":"4d43167909020458abc5e3e7310e3efaddb9fc7c783581fbc9422fa8b057d95d","src/remote/url/scheme_permission.rs":"4f6e528260c67af54171477d97707050f048c0c35e77f088f8ddc4ae135e6386","src/repository/attributes.rs":"2d727b5be3b13446415dc7fea5848c409c56b759e8a21eeeaca4649a6b4c8739","src/repository/cache.rs":"72d41c8f90d2e49c10b884582613fa5941ea0e1d15cc7d0a4d0d7be0b0243d4d","src/repository/config/mod.rs":"02d1a3d68c6a21b0fb7e199f69d7e7641645afa5710e9843a922a040d9422d27","src/repository/config/transport.rs":"cb163133228cb4d75c140b747fdc132b4512bd5b86b10f70bd8cd8f9a432859f","src/repository/excludes.rs":"408693ed4ac09d47354b3a9bf90c278252435eada4dfb0bb104f57395c2acca1","src/repository/identity.rs":"81d368f2b7d65800bf93d623f130ddb44a8d9e965cdd9757455733d31f92d483","src/repository/impls.rs":"7af7dd5ef7b7c1ff28e957175b4a2fea39574668d2768d20561ded5a48460a39","src/repository/init.rs":"96da087c036d751914f0a79ff1d942e53f668ff3fe74275edfa2baa1f400b3c2","src/repository/location.rs":"a5d30567442837259cf718e9f8f26633a17c997476669e15e5d3cd410b3b9971","src/repository/mod.rs":"8122e49e0c1c7820f10aae4b94298a56372a16f3e8b918267fa163cfc06b3023","src/repository/object.rs":"ae535bc6adc80043c5dcea243339445a91c957004ebfed8b9fc33f30a5a1ac7b","src/repository/permissions.rs":"9f7f41fd250d043cea7ee6ff0cdc315838dbb6226bde3dca2a7666f01d648090","src/repository/reference.rs":"c37e556966dd4308bc8b5784484612d9d62a438a443d1d667374ed604b238f5e","src/repository/remote.rs":"936f6a5e4b7d7a7bfe974c287e1f8fff4a2935d4020c6156bc469b74e84bd861","src/repository/revision.rs":"66126940c3a94776d94b901c14078d5b749723c3c0ed8500639edfe37aaa97da","src/repository/shallow.rs":"ce0b3358ed0ccca6ac52a985555793013f7c2d5de83291cd9810181ac22e714a","src/repository/snapshots.rs":"f99ca2e7d1bb3d1fff9d3df2d36b979c57197fcbbb633090edb0319d43873fa2","src/repository/state.rs":"040cca4a26463211aef85e4539d084969240f30d985c1bd3ae9bb3cd01009d1d","src/repository/thread_safe.rs":"ea2f5d07958d3fad08cba5028d18901a99088d3c1fc56934e3e01b0c4ea37c39","src/repository/worktree.rs":"48e44cb8cd798e6683a078fdc21bdfc62a52aa1c857a0dc17ee08ac411fc8914","src/revision/mod.rs":"a466315d4aea646ddba99c54f9ae118431b56dafbca6d0462ebabca3695d027d","src/revision/spec/mod.rs":"aa1516ed667a49bfa0db55fdea0bfbcc3227411be105496f0867bd7efb5d5dda","src/revision/spec/parse/delegate/mod.rs":"bfe787c5c881b5e4acf4bbcb79d966b8a92e56e8b2d20525bf0c0cd6ba0a0b8d","src/revision/spec/parse/delegate/navigate.rs":"b182bca82031b4ecfd4c36bcc48599a67a247b4e785591e85933eef50e428ff2","src/revision/spec/parse/delegate/revision.rs":"51ff36007b7376305cfcf8acbacc53ddb72796aceec8b761f4d1f1843554487c","src/revision/spec/parse/error.rs":"48c0c2e7dcffe80aac5563094787e0502c4275619fc35467a2687499bbad0fef","src/revision/spec/parse/mod.rs":"141e591acacfce8cc8d11c5b72d18c8d05baad1b21dead0d8e7242f4963410b7","src/revision/spec/parse/types.rs":"0713678daae38786c8828bf04a9608b75adf3751803e20711ed5d265998a3b8b","src/revision/walk.rs":"f96694a47f85b0e2dbf75871950dc6d8b2f02143e67981c473753d09d36399d4","src/shallow.rs":"4296fb5298ef71eb1d78aae21d11bfb129a4f5a5f3cf43bf6d5256fec40f8dc3","src/state.rs":"1e3c5e1df4016e8b3e60028def84b0f706c4fcffaba11b1152d9240e144f21e8","src/tag.rs":"f60043aaa7afb54652ab6cf64765ebd61607f19a83dd5960abf8077d2cb91d44","src/types.rs":"449feaa87a95a057c26b795b1d72911594eddf66248d1d984376599224b91b55","src/worktree/mod.rs":"7f09a39827ed42c66fc688752ed87ae2abc6605991bdf214e60c725766b044ea","src/worktree/proxy.rs":"07ff3cfc6a8f326fb7d62f6762f682498e9e5f131ece935acfd26b5223a338f1"},"package":"6bf41b61f7df395284f7a579c0fa1a7e012c5aede655174d4e91299ef1cac643"}
\ No newline at end of file diff --git a/vendor/gix/CHANGELOG.md b/vendor/gix/CHANGELOG.md index c98de68d0..85093b55b 100644 --- a/vendor/gix/CHANGELOG.md +++ b/vendor/gix/CHANGELOG.md @@ -5,6 +5,347 @@ 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.44.1 (2023-04-27) + +A maintenance release without user-facing changes. It's meant to fix breakage that occurred when publishing a breaking change in `gix-path` by accident. + +### Commit Statistics + +<csr-read-only-do-not-edit/> + + - 2 commits contributed to the release. + - 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** + - 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> + +## 0.44.0 (2023-04-26) + +### New Features + + - <csr-id-08e8fc2152794652ba1c986df493c2ac915af9e7/> `gix index entries` also prints attributes. + - <csr-id-bc28443e452c4de81368739a11a2482ae0a93485/> add `Repository::attributes()` and `Worktree::attributes()`. + - <csr-id-40a1b7444ba9d9b61a1c22a7f25662eec3c25a1b/> add `index.threads` configuration to `gix::config::tree` + - <csr-id-afe7faa14afb2ec4934f204e01ed12bcd0b3e786/> Before writing new objects, check if they exist. + That way we safe expensive IO at the cost of some CPU. + - <csr-id-037f52d4099e239c28210476ad7ab57d22aa3626/> add `Object::into_tag()` and `Tag::decode()` methods. + This makes the API more symmetric as similar methods exist for commits + and trees. + - <csr-id-35cb6b42bd8071e5e5c16ed6d37884deea524330/> Allow `USE_NSEC` and `USE_STDEV` compile time flags to configured at runtime. + Right now git may be compiled without these capabilities, even though on some platforms + it might make perfect sense to enable them by default or enable them on a per repository + basis. This is now possible thanks to added gitoxide specific functions. + - <csr-id-358500f0efaec7c67b307a6a1aa27ecad7502eb7/> `open::Options` now allow controlling where gitattributes files are loaded from. + That way it's possible to, for example, isolate all operations that rely on the `gitattribute` + system, like checkouts or additions to the index. + - <csr-id-ec93f75cfdf6cbd617c4a92eefae97f2c7736d65/> `revision::walk::Platform::selected(filter)` to selectively prune parts of the commit graph. + +### Bug Fixes + + - <csr-id-2cd5054b0a1994571a25a49193449904cfd30b50/> When removing all shallow commits from shallow file, delete it. + Previously it would leave an empty file, which will be ignored by the implementation + but might be confusing to users. + - <csr-id-43f695a9607f1f85f859f2ef944b785b5b6dd238/> `gix::open()` can handle bare repositories with index. + These are mis-classified as non-bare repository, which previosuly + caused it to get off-track. + +### New Features (BREAKING) + + - <csr-id-26e6a661ed5827151708b9fcc3d7468aa60cf4e3/> add `Repository::excludes()` and simplify signature of `Worktree::excludes()`. + Further, this change removes the `permission` module without replacement, + and moves `permissions` into `open`. + + This corrects an artifact of this crate previously being name `gix-repository` and brings + these types semantically closer to where they are actually used. + - <csr-id-cb3437632fe7ff0ce4efd11c08a8d684d7e7e430/> support configuring the connection (i.e. for auth) during clone. + This change also removes the generic type for Progress from `Connection` + which forces it to be passed to every potentially long-running method. + - <csr-id-b83ee366a3c65c717beb587ad809268f1c54b8ad/> Rename `serde1` cargo feature to `serde` and use the weak-deps cargo capability. + With it it's possible to not automatically declare all optional dependencies externally visible + features, and thus re-use feature names that oterwise are also a crate name. + + Previously I thought that `serde1` is for future-proofing and supporting multiple serde versions + at the same time. However, it's most definitely a burden I wouldn't want anyway, so using + `serde` seems to be the way to go into the future. + - <csr-id-b645d28f9641c6b4022e1e37ad9fe528922ec747/> remove types that are now available in `gix-os` + +### Commit Statistics + +<csr-read-only-do-not-edit/> + + - 48 commits contributed to the release over the course of 26 calendar days. + - 27 days passed between releases. + - 14 commits were understood as [conventional](https://www.conventionalcommits.org). + - 2 unique issues were worked on: [#801](https://github.com/Byron/gitoxide/issues/801), [#814](https://github.com/Byron/gitoxide/issues/814) + +### Thanks Clippy + +<csr-read-only-do-not-edit/> + +[Clippy](https://github.com/rust-lang/rust-clippy) helped 1 time to make code idiomatic. + +### Commit Details + +<csr-read-only-do-not-edit/> + +<details><summary>view details</summary> + + * **[#801](https://github.com/Byron/gitoxide/issues/801)** + - `revision::walk::Platform::selected(filter)` to selectively prune parts of the commit graph. ([`ec93f75`](https://github.com/Byron/gitoxide/commit/ec93f75cfdf6cbd617c4a92eefae97f2c7736d65)) + * **[#814](https://github.com/Byron/gitoxide/issues/814)** + - Rename `serde1` cargo feature to `serde` and use the weak-deps cargo capability. ([`b83ee36`](https://github.com/Byron/gitoxide/commit/b83ee366a3c65c717beb587ad809268f1c54b8ad)) + * **Uncategorized** + - Release gix-worktree v0.16.0, gix v0.44.0 ([`4527fb8`](https://github.com/Byron/gitoxide/commit/4527fb8e0fe0786a70ccfd8c3f5c5e79e8867944)) + - Release gix-index v0.16.0, gix-mailmap v0.12.0, gix-pack v0.34.0, gix-odb v0.44.0, gix-packetline v0.16.0, gix-transport v0.30.0, gix-protocol v0.31.0, gix-revision v0.13.0, gix-refspec v0.10.0, gix-worktree v0.16.0, gix v0.44.0 ([`d7173b2`](https://github.com/Byron/gitoxide/commit/d7173b2d2cb79685fdf7f618c31c576db24fa648)) + - Release gix-index v0.16.0, gix-mailmap v0.12.0, gix-pack v0.34.0, gix-odb v0.44.0, gix-packetline v0.16.0, gix-transport v0.30.0, gix-protocol v0.31.0, gix-revision v0.13.0, gix-refspec v0.10.0, gix-worktree v0.16.0, gix v0.44.0 ([`e4df557`](https://github.com/Byron/gitoxide/commit/e4df5574c0813a0236319fa6e8b3b41bab179fc8)) + - Release gix-hash v0.11.1, gix-path v0.7.4, gix-glob v0.6.0, gix-attributes v0.11.0, gix-config-value v0.11.0, gix-fs v0.1.1, gix-tempfile v5.0.3, gix-utils v0.1.1, gix-lock v5.0.1, gix-object v0.29.1, gix-ref v0.28.0, gix-sec v0.7.0, gix-config v0.21.0, gix-prompt v0.4.0, gix-url v0.17.0, gix-credentials v0.13.0, gix-diff v0.29.0, gix-discover v0.17.0, gix-hashtable v0.2.0, gix-ignore v0.1.0, gix-bitmap v0.2.3, gix-traverse v0.25.0, gix-index v0.16.0, gix-mailmap v0.12.0, gix-pack v0.34.0, gix-odb v0.44.0, gix-packetline v0.16.0, gix-transport v0.30.0, gix-protocol v0.31.0, gix-revision v0.13.0, gix-refspec v0.10.0, gix-worktree v0.16.0, gix v0.44.0, safety bump 7 crates ([`91134a1`](https://github.com/Byron/gitoxide/commit/91134a11c8ba0e942f692488ec9bce9fa1086324)) + - Prepare changelogs prior to release ([`30a1a71`](https://github.com/Byron/gitoxide/commit/30a1a71f36f24faac0e0b362ffdfedea7f9cdbf1)) + - When removing all shallow commits from shallow file, delete it. ([`2cd5054`](https://github.com/Byron/gitoxide/commit/2cd5054b0a1994571a25a49193449904cfd30b50)) + - Merge branch 'index-entries-attrs' ([`f37a930`](https://github.com/Byron/gitoxide/commit/f37a930aefa27e67f0b693ba9669cc26d49044fa)) + - `gix index entries` also prints attributes. ([`08e8fc2`](https://github.com/Byron/gitoxide/commit/08e8fc2152794652ba1c986df493c2ac915af9e7)) + - Adjust to changes in `gix-worktree` ([`27a39ca`](https://github.com/Byron/gitoxide/commit/27a39cad498ca8b2c9cba05790284e2b68ba7636)) + - Add `Repository::attributes()` and `Worktree::attributes()`. ([`bc28443`](https://github.com/Byron/gitoxide/commit/bc28443e452c4de81368739a11a2482ae0a93485)) + - Add `Repository::excludes()` and simplify signature of `Worktree::excludes()`. ([`26e6a66`](https://github.com/Byron/gitoxide/commit/26e6a661ed5827151708b9fcc3d7468aa60cf4e3)) + - Add `index.threads` configuration to `gix::config::tree` ([`40a1b74`](https://github.com/Byron/gitoxide/commit/40a1b7444ba9d9b61a1c22a7f25662eec3c25a1b)) + - Adjust to changes in `gix-worktree` ([`f722d6b`](https://github.com/Byron/gitoxide/commit/f722d6bebcd215b6e270261a3ed032a5f7e7b72f)) + - Merge branch 'attributes-cache' ([`3456c84`](https://github.com/Byron/gitoxide/commit/3456c845dfeedd2fa96b4313b1a84c8cbe9433c5)) + - Adjust to changes in `gix-worktree` ([`13a070f`](https://github.com/Byron/gitoxide/commit/13a070f405230d52e4377e18f6bdc5c673b718a0)) + - Merge branch 'fix-823' ([`6ebd61e`](https://github.com/Byron/gitoxide/commit/6ebd61e548a36a04e413ac725a03e607a3588334)) + - `gix::open()` can handle bare repositories with index. ([`43f695a`](https://github.com/Byron/gitoxide/commit/43f695a9607f1f85f859f2ef944b785b5b6dd238)) + - Thanks clippy ([`14e64e7`](https://github.com/Byron/gitoxide/commit/14e64e74649cfb1f2f99da87015939af98fae5c8)) + - Merge branch 'clone-auth' ([`1a65308`](https://github.com/Byron/gitoxide/commit/1a653083bf0a3a01ee116535e65202392a2c676c)) + - Support configuring the connection (i.e. for auth) during clone. ([`cb34376`](https://github.com/Byron/gitoxide/commit/cb3437632fe7ff0ce4efd11c08a8d684d7e7e430)) + - Merge branch 'fix-819' ([`69faad0`](https://github.com/Byron/gitoxide/commit/69faad0d7cc100de54d757d42acc152a22edc022)) + - Before writing new objects, check if they exist. ([`afe7faa`](https://github.com/Byron/gitoxide/commit/afe7faa14afb2ec4934f204e01ed12bcd0b3e786)) + - Add `Object::into_tag()` and `Tag::decode()` methods. ([`037f52d`](https://github.com/Byron/gitoxide/commit/037f52d4099e239c28210476ad7ab57d22aa3626)) + - Release gix-utils v0.1.0, gix-hash v0.11.0, gix-date v0.5.0, gix-features v0.29.0, gix-actor v0.20.0, gix-object v0.29.0, gix-archive v0.1.0, gix-fs v0.1.0, safety bump 25 crates ([`8dbd0a6`](https://github.com/Byron/gitoxide/commit/8dbd0a60557a85acfa231800a058cbac0271a8cf)) + - Support native zlib-ng via flate2's zlib-ng feature ([`9a6e0d7`](https://github.com/Byron/gitoxide/commit/9a6e0d7b418ea721da6a7e4bc48c47b47d4dfa79)) + - Make fmt ([`5d2b5d0`](https://github.com/Byron/gitoxide/commit/5d2b5d02c3869e07dc2507a8f2519ee1df633df7)) + - Merge branch 'main' into dev ([`cdef398`](https://github.com/Byron/gitoxide/commit/cdef398c4a3bd01baf0be2c27a3f77a400172b0d)) + - Minor adjustments to the worktree structure. ([`8920229`](https://github.com/Byron/gitoxide/commit/89202296f63dacedfd396aefe25e686b4d426b2a)) + - Rename the serde1 feature to serde ([`19338d9`](https://github.com/Byron/gitoxide/commit/19338d934b6712b7d6bd3fa3b2e4189bf7e6c8a1)) + - Create new `gix-fs` crate to consolidate all filesystem utilities ([`f8cc33c`](https://github.com/Byron/gitoxide/commit/f8cc33cb372dd2b4bbe4a09cf4f64916681ab1dd)) + - Allow `USE_NSEC` and `USE_STDEV` compile time flags to configured at runtime. ([`35cb6b4`](https://github.com/Byron/gitoxide/commit/35cb6b42bd8071e5e5c16ed6d37884deea524330)) + - Merge branch 'main' into dev ([`23ee47f`](https://github.com/Byron/gitoxide/commit/23ee47fb24c197f8437bd426544b2aa74e005bdc)) + - Merge branch 'worktree-stack' ([`3d47919`](https://github.com/Byron/gitoxide/commit/3d47919c1a2f83fc7c1fd7ae590d098057a22626)) + - `open::Options` now allow controlling where gitattributes files are loaded from. ([`358500f`](https://github.com/Byron/gitoxide/commit/358500f0efaec7c67b307a6a1aa27ecad7502eb7)) + - Adjust to changes in `gix-attributes` ([`1755c81`](https://github.com/Byron/gitoxide/commit/1755c81f64ce8a68807c2026eeae13dc46021db1)) + - Remove types that are now available in `gix-os` ([`b645d28`](https://github.com/Byron/gitoxide/commit/b645d28f9641c6b4022e1e37ad9fe528922ec747)) + - Refactor ([`0677406`](https://github.com/Byron/gitoxide/commit/067740636b3ca24ce90db91923dfd4ee592fa7f6)) + - Centralize index entry Stat creation/comparison ([`870bdb2`](https://github.com/Byron/gitoxide/commit/870bdb2f3957e0f5690679e2aeb6752cd0b8d93e)) + - Release gix-hash v0.10.4, gix-hashtable v0.1.3 ([`b574a39`](https://github.com/Byron/gitoxide/commit/b574a3904203762a6b9e475e16a7c358d7616599)) + - Merge branch 'patch-1' ([`b02bf24`](https://github.com/Byron/gitoxide/commit/b02bf247890c873184e58f734e0912eac6c6bbae)) + - Add test to run tests on 32 bit systems ([`fb31ee8`](https://github.com/Byron/gitoxide/commit/fb31ee8bbcfc72fa0e7e38bc84d02f6f7d2f0fff)) + - Merge branch 'patch-1' ([`d0052c1`](https://github.com/Byron/gitoxide/commit/d0052c13cabcde8058177d2439053b50ea5adbfc)) + - Upgrade serial-test to v2 ([`6932017`](https://github.com/Byron/gitoxide/commit/69320174685e72940cd0fe600c94abb948a62bdd)) + - Release gix-revision v0.12.2 ([`ec64a88`](https://github.com/Byron/gitoxide/commit/ec64a88690243a210efee6d5ae5164723e13f734)) + - Merge branch 'fix-801' ([`a884121`](https://github.com/Byron/gitoxide/commit/a88412194ff8960cd69a3794042d9c6c29428ea6)) + - Prevent env-altering tests to affect shallow tests ([`61eec5a`](https://github.com/Byron/gitoxide/commit/61eec5ae48006b4f0a6ac5c7b9549811dfa9431d)) +</details> + +## 0.43.1 (2023-03-30) + +### Documentation + + - <csr-id-02c4659984fa6423bc76cc4980a143edaba8ace0/> fix minor typos + - <csr-id-cc48c35d0ecf35824910c5b6ecc62fe9b2aff1b5/> fix minor typos + +### New Features + + - <csr-id-7c2e5c8d08e4dd1ec115ae06f20f9c8f93d6d616/> add `Tree::decode()` and `TryFrom<Tree> for gix::objs::Tree`. + This makes it possible to obtain mutable trees for creating trees by hand + for the purpose of making commits. + +### Bug Fixes + + - <csr-id-d1bd513f27e17787eb223f7b0521f954c518153e/> $HOME detection on windows + +### Commit Statistics + +<csr-read-only-do-not-edit/> + + - 9 commits contributed to the release over the course of 3 calendar days. + - 4 days passed between releases. + - 4 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-path v0.7.3, gix-config-value v0.10.2, gix-config v0.20.1, gix-discover v0.16.2, gix-index v0.15.1, gix-odb v0.43.1, gix-packetline v0.15.1, gix-protocol v0.30.2, gix-worktree v0.15.2, gix v0.43.1 ([`38eed1d`](https://github.com/Byron/gitoxide/commit/38eed1d06e7cbb8fbcd54b2cad3163ca45e0baf1)) + - Merge branch 'pascalkuthe/main' ([`d47cebe`](https://github.com/Byron/gitoxide/commit/d47cebe3b23080c45829cb307b867220e3af20db)) + - Refactor ([`d1e5e12`](https://github.com/Byron/gitoxide/commit/d1e5e12d54f79c030325860838c1cfadac1a7ac5)) + - $HOME detection on windows ([`d1bd513`](https://github.com/Byron/gitoxide/commit/d1bd513f27e17787eb223f7b0521f954c518153e)) + - Fix minor typos ([`02c4659`](https://github.com/Byron/gitoxide/commit/02c4659984fa6423bc76cc4980a143edaba8ace0)) + - Fix minor typos ([`cc48c35`](https://github.com/Byron/gitoxide/commit/cc48c35d0ecf35824910c5b6ecc62fe9b2aff1b5)) + - Add `Tree::decode()` and `TryFrom<Tree> for gix::objs::Tree`. ([`7c2e5c8`](https://github.com/Byron/gitoxide/commit/7c2e5c8d08e4dd1ec115ae06f20f9c8f93d6d616)) + - Release gix-ref v0.27.2 ([`e965b18`](https://github.com/Byron/gitoxide/commit/e965b18aedcf13ec4538bc7bc700269a56ca615e)) + - Be sure to clear the buffer after an intermediate read error happened and we ignore it. ([`877951a`](https://github.com/Byron/gitoxide/commit/877951aa0009ab5e2a814c95f4c5d3662305cb27)) +</details> + +## 0.43.0 (2023-03-26) + +<csr-id-87f5621d941b5af40abd59a26164a09d0dde2649/> + +### Bug Fixes + + - <csr-id-7bd8823ab4241d6d0401f03aec8c0d34f68c347c/> opening repositories without 'strict' mode also ignores IO errors. + These will instead be logged, but won't make it impossible to open an + otherwise fine repository. + +### Other + + - <csr-id-87f5621d941b5af40abd59a26164a09d0dde2649/> make clear that `gix::discover()` isn't suited for authentication remote operations. + We also provide information on how to accomplish this. + +### Commit Statistics + +<csr-read-only-do-not-edit/> + + - 6 commits contributed to the release over the course of 5 calendar days. + - 11 days passed between releases. + - 2 commits were understood as [conventional](https://www.conventionalcommits.org). + - 2 unique issues were worked on: [#787](https://github.com/Byron/gitoxide/issues/787), [#790](https://github.com/Byron/gitoxide/issues/790) + +### Commit Details + +<csr-read-only-do-not-edit/> + +<details><summary>view details</summary> + + * **[#787](https://github.com/Byron/gitoxide/issues/787)** + - Make clear that `gix::discover()` isn't suited for authentication remote operations. ([`87f5621`](https://github.com/Byron/gitoxide/commit/87f5621d941b5af40abd59a26164a09d0dde2649)) + * **[#790](https://github.com/Byron/gitoxide/issues/790)** + - Opening repositories without 'strict' mode also ignores IO errors. ([`7bd8823`](https://github.com/Byron/gitoxide/commit/7bd8823ab4241d6d0401f03aec8c0d34f68c347c)) + * **Uncategorized** + - Release gix-tempfile v5.0.2, gix-validate v0.7.4, gix-config v0.20.0, gix-prompt v0.3.3, gix-diff v0.28.1, gix-discover v0.16.1, gix-pack v0.33.2, gix-transport v0.29.1, gix-protocol v0.30.1, gix-revision v0.12.1, gix-worktree v0.15.1, gix v0.43.0, safety bump gix v0.43.0 ([`5dc1f9f`](https://github.com/Byron/gitoxide/commit/5dc1f9f2bcb8b3e147115fcb6f76558e8f48ffef)) + - Prepare changelogs prior to release ([`3016a28`](https://github.com/Byron/gitoxide/commit/3016a285f566bdfe7de2774fa6f2254c1b1a2c51)) + - Merge branch 'fix-790' ([`ee36e5b`](https://github.com/Byron/gitoxide/commit/ee36e5bb985e9ad90bc382cdd051a8b5295ca18c)) + - Less dependencies for tests (via `serial_test` no default features) ([`8f2accd`](https://github.com/Byron/gitoxide/commit/8f2accdf738def9aa4abdf08fc299d0e9807bc3e)) +</details> + +## 0.42.0 (2023-03-14) + +### New Features + + - <csr-id-93d412c54833d822e5369644226c6fd3b888c89c/> shallow support for `fetch` operations. + - <csr-id-4e89c19d7656a96bd512dafbc9669011487671f5/> shallow support for `clone` operations. + +### Commit Statistics + +<csr-read-only-do-not-edit/> + + - 11 commits contributed to the release over the course of 3 calendar days. + - 3 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** + - Release gix-features v0.28.1, gix-tempfile v5.0.1, gix-ref v0.27.1, gix-pack v0.33.1, gix-packetline v0.15.0, gix-transport v0.29.0, gix-protocol v0.30.0, gix v0.42.0, safety bump 3 crates ([`c1f1bfb`](https://github.com/Byron/gitoxide/commit/c1f1bfb8dc0e73993678353e4492d0614b642ed1)) + - Prepare changelogs prior to release ([`c66e298`](https://github.com/Byron/gitoxide/commit/c66e2982577e4cd9faef63798986b8cf8ece93a2)) + - Make fmt ([`3836cc0`](https://github.com/Byron/gitoxide/commit/3836cc0c9c3e1158b56142b924483c8a77217d53)) + - Merge branch 'various-fixes' ([`cc0f506`](https://github.com/Byron/gitoxide/commit/cc0f5061fba27d57022dc616c941034b98fd4875)) + - Improve fetchspec handling to be closer to what git does. ([`a22621d`](https://github.com/Byron/gitoxide/commit/a22621d1b92a6155b83a09e68ed1de3a4860e766)) + - Assure that --deepen 0 (despite allowed) doesn't actually confuse the server. ([`b43ea6b`](https://github.com/Byron/gitoxide/commit/b43ea6bdc873da2facdb0fe8369ab1644a6702ef)) + - Adjust to changes in `gix-packetline` ([`4f45814`](https://github.com/Byron/gitoxide/commit/4f45814eea9c20b449effd9b29d31623943ff853)) + - Merge branch 'shallow-protocol' ([`531dd19`](https://github.com/Byron/gitoxide/commit/531dd19502b8b635fb1a60f747eb381fd12e00ca)) + - Shallow support for `fetch` operations. ([`93d412c`](https://github.com/Byron/gitoxide/commit/93d412c54833d822e5369644226c6fd3b888c89c)) + - Shallow support for `clone` operations. ([`4e89c19`](https://github.com/Byron/gitoxide/commit/4e89c19d7656a96bd512dafbc9669011487671f5)) + - Merge branch 'fix-cred-helper' ([`01277a6`](https://github.com/Byron/gitoxide/commit/01277a681e4997896e04567490c572b5af606f35)) +</details> + +## 0.41.0 (2023-03-10) + +A maintenance release without user-facing changes, but with some fixes in the dependency chain, namely: + +- `gix-credentials` allows credential helpers to ignore `stdin`, making it robust when facing helpers that don't read from `stdin`. +- `gix-tempfile` refers to the most recent version of `tempfile` without pinning it, which removes a security vulnerability. + +### Commit Statistics + +<csr-read-only-do-not-edit/> + + - 4 commits contributed to the release. + - 1 day 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-tempfile v5.0.0, gix-lock v5.0.0, gix-ref v0.27.0, gix-config v0.19.0, gix-url v0.16.0, gix-credentials v0.12.0, gix-discover v0.16.0, gix-index v0.15.0, gix-pack v0.33.0, gix-odb v0.43.0, gix-transport v0.28.0, gix-protocol v0.29.0, gix-worktree v0.15.0, gix v0.41.0, safety bump 12 crates ([`29a0870`](https://github.com/Byron/gitoxide/commit/29a087043d1feb2f127b065341c8028d0bd0301e)) + - Prepare changelogs prior to release ([`e06f5f5`](https://github.com/Byron/gitoxide/commit/e06f5f523e83f4da390eddbebcb9a2d58674587b)) + - Merge branch 'password-in-urls' ([`85f8b28`](https://github.com/Byron/gitoxide/commit/85f8b283a1671e2631cda437ca8da93f9a2a4ebd)) + - Adjust to changes in `gix-url` ([`66602bb`](https://github.com/Byron/gitoxide/commit/66602bbb7fe62f7425c8289902a1d2fce121e87c)) +</details> + +## 0.40.0 (2023-03-09) + +### New Features + + - <csr-id-5bfbb9a32f8edb8bfb71ae00167277b9109de35a/> `Repository::shallow_commits()` returns an uptodate list of shallow boundary commits. + - <csr-id-3e69535630714205904fe64f511da28a3f2d7fb6/> `Repository::is_shallow()` to test if a repository is shallow. + +### Bug Fixes (BREAKING) + + - <csr-id-1046ea2b3312838169aa08f30b598bf4ce2338d9/> allow to traverse the entire commit graph of shallow repos + Previously, when traversing commits, we would assume to be in a + shallow repository if a commit's parent could not be found in the + repository. + + Now we validate that assumption by reading the 'shallow' file to + check if the last seen commit is on the commit boundary. + + This removes `is_shallow` and `error_on_missing_commit()` on the + `revision::walk::Platform` as shallow commits are now known and handled + without any guesswork. + +### Commit Statistics + +<csr-read-only-do-not-edit/> + + - 5 commits contributed to the release over the course of 3 calendar days. + - 4 days passed between releases. + - 3 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 v0.40.0 ([`18e72c9`](https://github.com/Byron/gitoxide/commit/18e72c988a58415080d4555bc869ae04df8d04fa)) + - Merge branch 'shallow-support' ([`6d88fd2`](https://github.com/Byron/gitoxide/commit/6d88fd208bcdec0603d57785bdbfe2f286a65384)) + - Allow to traverse the entire commit graph of shallow repos ([`1046ea2`](https://github.com/Byron/gitoxide/commit/1046ea2b3312838169aa08f30b598bf4ce2338d9)) + - `Repository::shallow_commits()` returns an uptodate list of shallow boundary commits. ([`5bfbb9a`](https://github.com/Byron/gitoxide/commit/5bfbb9a32f8edb8bfb71ae00167277b9109de35a)) + - `Repository::is_shallow()` to test if a repository is shallow. ([`3e69535`](https://github.com/Byron/gitoxide/commit/3e69535630714205904fe64f511da28a3f2d7fb6)) +</details> + ## 0.39.0 (2023-03-04) A maintenance release without user-facing changes, primarily for getting the progress-bar updates into `cargo`. @@ -13,7 +354,7 @@ A maintenance release without user-facing changes, primarily for getting the pro <csr-read-only-do-not-edit/> - - 2 commits contributed to the release. + - 3 commits contributed to the release. - 3 days passed between releases. - 0 commits were understood as [conventional](https://www.conventionalcommits.org). - 0 issues like '(#ID)' were seen in commit messages @@ -25,6 +366,7 @@ A maintenance release without user-facing changes, primarily for getting the pro <details><summary>view details</summary> * **Uncategorized** + - Release gix-attributes v0.10.0, gix-ref v0.26.0, gix-config v0.18.0, gix-url v0.15.0, gix-credentials v0.11.0, gix-discover v0.15.0, gix-index v0.14.0, gix-mailmap v0.11.0, gix-odb v0.42.0, gix-transport v0.27.0, gix-protocol v0.28.0, gix-revision v0.12.0, gix-refspec v0.9.0, gix-worktree v0.14.0, gix v0.39.0 ([`93e75fe`](https://github.com/Byron/gitoxide/commit/93e75fed454ed8b342231bde4638db90e407ce52)) - Prepare changelogs prior to release ([`895e482`](https://github.com/Byron/gitoxide/commit/895e482badf01e953bb9144001eebd5e1b1c4d84)) - Release gix-features v0.28.0, gix-actor v0.19.0, gix-object v0.28.0, gix-diff v0.28.0, gix-traverse v0.24.0, gix-pack v0.32.0, safety bump 20 crates ([`0f411e9`](https://github.com/Byron/gitoxide/commit/0f411e93ec812592bb9d3a52b751399dd86f76f7)) </details> diff --git a/vendor/gix/Cargo.lock b/vendor/gix/Cargo.lock index 10cda1ac2..ff332a329 100644 --- a/vendor/gix/Cargo.lock +++ b/vendor/gix/Cargo.lock @@ -22,9 +22,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.69" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "224afbd727c3d6e4b90103ece64b8d1b67fbb1973b1046c2281eed3f3803f800" +checksum = "7de8ce5e0f9f8d88245311066a578d72b7af3e7088f32783804676302df237e4" [[package]] name = "arc-swap" @@ -45,7 +45,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3203e79f4dd9bdda415ed03cf14dae5a2bf775c683a00f94e9cd1faf0f596e5" dependencies = [ "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -61,9 +61,9 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17adb73da160dfb475c183343c8cccd80721ea5a605d3eb57125f0a7b7a92d0b" +checksum = "6fa3dc5f2a8564f07759c008b9109dc0d39de92a88d5588b8a5036d286383afb" dependencies = [ "async-lock", "async-task", @@ -90,22 +90,22 @@ dependencies = [ [[package]] name = "async-io" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c374dda1ed3e7d8f0d9ba58715f924862c63eae6849c92d3a18e7fbde9e2794" +checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" dependencies = [ "async-lock", "autocfg", + "cfg-if", "concurrent-queue", "futures-lite", - "libc", "log", "parking", "polling", + "rustix", "slab", "socket2", "waker-fn", - "windows-sys 0.42.0", ] [[package]] @@ -146,26 +146,26 @@ dependencies = [ [[package]] name = "async-task" -version = "4.3.0" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a40729d2133846d9ed0ea60a8b9541bccddab49cd30f0715a1da672fe9a2524" +checksum = "ecc7ab41815b3c653ccd2978ec3255c81349336702dfdf62ee6f7069b12a3aae" [[package]] name = "async-trait" -version = "0.1.65" +version = "0.1.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "095183a3539c7c7649b2beb87c2d3f0591f3a7fed07761cc546d244e27e0238c" +checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.15", ] [[package]] name = "atomic-waker" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "debc29dde2e69f9e47506b525f639ed42300fc014a3e007832592448fa8e4599" +checksum = "1181e1e0d1fce796a03db1ae795d67167da795f9cf4a39c37589e85ef57f26d3" [[package]] name = "autocfg" @@ -186,19 +186,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] +name = "bitflags" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c70beb79cbb5ce9c4f8e20849978f34225931f665bb49efa6982875a4d5facb3" +dependencies = [ + "serde", +] + +[[package]] name = "block-buffer" -version = "0.10.3" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ "generic-array", ] [[package]] name = "blocking" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c67b173a56acffd6d2326fb7ab938ba0b00a71480e14902b2591c87bc5741e8" +checksum = "77231a1c8f801696fc0123ec6150ce92cffb8e164a02afb9c8ddee0e9b65ad65" dependencies = [ "async-channel", "async-lock", @@ -206,13 +215,14 @@ dependencies = [ "atomic-waker", "fastrand", "futures-lite", + "log", ] [[package]] name = "bstr" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ffdb39cb703212f3c11973452c2861b972f757b021158f3516ba10f2fa8b2c1" +checksum = "c3d4260bcc2e8fc9df1eac4919a720effeb63a3f0952f5bf4944adfa18897f09" dependencies = [ "memchr", "once_cell", @@ -267,18 +277,18 @@ checksum = "b8191fa7302e03607ff0e237d4246cc043ff5b3cb9409d995172ba3bea16b807" [[package]] name = "cmake" -version = "0.1.49" +version = "0.1.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db34956e100b30725f2eb215f90d4871051239535632f84fea3bc92722c66b7c" +checksum = "a31c789563b815f77f4250caee12365734369f942439b7defd71e18a48197130" dependencies = [ "cc", ] [[package]] name = "concurrent-queue" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c278839b831783b70278b14df4d45e1beb1aad306c07bb796637de9a0e323e8e" +checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" dependencies = [ "crossbeam-utils", ] @@ -295,15 +305,15 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" +checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "cpufeatures" -version = "0.2.5" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" +checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" dependencies = [ "libc", ] @@ -333,9 +343,9 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf2b3e8478797446514c91ef04bafcb59faba183e621ad488df88983cc14128c" +checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" dependencies = [ "cfg-if", "crossbeam-utils", @@ -401,7 +411,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" dependencies = [ "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -421,9 +431,9 @@ dependencies = [ [[package]] name = "curl-sys" -version = "0.4.60+curl-7.88.1" +version = "0.4.61+curl-8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "717abe2cb465a5da6ce06617388a3980c9a2844196734bec8ccb8e575250f13f" +checksum = "14d05c10f541ae6f3bc5b3d923c20001f47db7d5f0b2bc6ad16490133842db79" dependencies = [ "cc", "libc", @@ -464,26 +474,6 @@ dependencies = [ ] [[package]] -name = "dirs" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs-sys" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" -dependencies = [ - "libc", - "redox_users", - "winapi", -] - -[[package]] name = "document-features" version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -494,9 +484,9 @@ dependencies = [ [[package]] name = "dunce" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bd4b30a6560bbd9b4620f4de34c3f14f60848e58a9b7216801afcb4c7b31c3c" +checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" [[package]] name = "either" @@ -522,18 +512,18 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "errno" -version = "0.2.8" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" +checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" dependencies = [ "errno-dragonfly", "libc", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -563,14 +553,14 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.20" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a3de6e8d11b22ff9edc6d916f890800597d60f8b2da1caf2955c274638d6412" +checksum = "5cbc844cecaee9d4443931972e1289c8ff485cb4cc2767cb03ca139ed6885153" dependencies = [ "cfg-if", "libc", - "redox_syscall", - "windows-sys 0.45.0", + "redox_syscall 0.2.16", + "windows-sys 0.48.0", ] [[package]] @@ -580,7 +570,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" dependencies = [ "crc32fast", - "libz-sys", + "libz-ng-sys", "miniz_oxide", ] @@ -615,58 +605,31 @@ dependencies = [ ] [[package]] -name = "futures" -version = "0.3.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13e2792b0ff0340399d58445b88fd9770e3489eff258a4cbc1523418f12abf84" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] name = "futures-channel" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e5317663a9089767a1ec00a487df42e0ca174b61b4483213ac24448e4664df5" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" dependencies = [ "futures-core", - "futures-sink", ] [[package]] name = "futures-core" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec90ff4d0fe1f57d600049061dc6bb68ed03c7d2fbd697274c41805dcb3f8608" - -[[package]] -name = "futures-executor" -version = "0.3.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8de0a35a6ab97ec8869e32a2473f4b1324459e14c29275d14b10cb1fd19b50e" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" [[package]] name = "futures-io" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfb8371b6fb2aeb2d280374607aeabfc99d95c72edfe51692e42d3d7f0d08531" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" [[package]] name = "futures-lite" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7694489acd39452c77daa48516b894c153f192c3578d5a839b62c58099fcbf48" +checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" dependencies = [ "fastrand", "futures-core", @@ -679,26 +642,24 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f310820bb3e8cfd46c80db4d7fb8353e15dfff853a127158425f31e0be6c8364" +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" [[package]] name = "futures-task" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf79a1bf610b10f42aea489289c5a2c478a786509693b80cd39c44ccd936366" +checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" [[package]] name = "futures-util" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c1d6de3acfef38d2be4b1f543f553131788603495be83da675e180c8d6b7bd1" +checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" dependencies = [ - "futures-channel", "futures-core", "futures-io", - "futures-sink", "futures-task", "memchr", "pin-project-lite", @@ -708,9 +669,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.14.6" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", @@ -718,9 +679,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" +checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" dependencies = [ "cfg-if", "libc", @@ -729,7 +690,7 @@ dependencies = [ [[package]] name = "gix" -version = "0.39.0" +version = "0.44.1" dependencies = [ "anyhow", "async-std", @@ -742,9 +703,11 @@ dependencies = [ "gix-diff", "gix-discover", "gix-features", + "gix-fs", "gix-glob", "gix-hash", "gix-hashtable", + "gix-ignore", "gix-index", "gix-lock", "gix-mailmap", @@ -762,6 +725,7 @@ dependencies = [ "gix-transport", "gix-traverse", "gix-url", + "gix-utils", "gix-validate", "gix-worktree", "is_ci", @@ -781,9 +745,9 @@ dependencies = [ [[package]] name = "gix-actor" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc22b0cdc52237667c301dd7cdc6ead8f8f73c9f824e9942c8ebd6b764f6c0bf" +checksum = "848efa0f1210cea8638f95691c82a46f98a74b9e3524f01d4955ebc25a8f84f3" dependencies = [ "bstr", "btoi", @@ -796,25 +760,27 @@ dependencies = [ [[package]] name = "gix-attributes" -version = "0.10.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2231a25934a240d0a4b6f4478401c73ee81d8be52de0293eedbc172334abf3e1" +checksum = "3015baa01ad2122fbcaab7863c857a603eb7b7ec12ac8141207c42c6439805e2" dependencies = [ "bstr", - "gix-features", "gix-glob", "gix-path", "gix-quote", + "kstring", + "log", "serde", + "smallvec", "thiserror", "unicode-bom", ] [[package]] name = "gix-bitmap" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "024bca0c7187517bda5ea24ab148c9ca8208dd0c3e2bea88cdb2008f91791a6d" +checksum = "55a95f4942360766c3880bdb2b4b57f1ef73b190fc424755e7fdf480430af618" dependencies = [ "thiserror", ] @@ -839,9 +805,9 @@ dependencies = [ [[package]] name = "gix-config" -version = "0.18.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52c62e26ce11f607712e4f49a0a192ed87675d30187fd61be070abbd607d12f1" +checksum = "1d252a0eddb6df74600d3d8872dc9fe98835a7da43110411d705b682f49d4ac1" dependencies = [ "bstr", "gix-config-value", @@ -850,6 +816,7 @@ dependencies = [ "gix-path", "gix-ref", "gix-sec", + "log", "memchr", "nom", "once_cell", @@ -860,11 +827,11 @@ dependencies = [ [[package]] name = "gix-config-value" -version = "0.10.1" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693d4a4ba0531e46fe558459557a5b29fb86c3e4b2666c1c0861d93c7c678331" +checksum = "786861e84a5793ad5f863d846de5eb064cd23b87e61ad708c8c402608202e7be" dependencies = [ - "bitflags", + "bitflags 2.1.0", "bstr", "gix-path", "libc", @@ -873,9 +840,9 @@ dependencies = [ [[package]] name = "gix-credentials" -version = "0.11.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5be32b5fe339a31b8e53fa854081dc914c45020dcb64637f3c21baf69c96fc1b" +checksum = "4874a4fc11ffa844a3c2b87a66957bda30a73b577ef1acf15ac34df5745de5ff" dependencies = [ "bstr", "gix-command", @@ -890,9 +857,9 @@ dependencies = [ [[package]] name = "gix-date" -version = "0.4.3" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b96271912ce39822501616f177dea7218784e6c63be90d5f36322ff3a722aae2" +checksum = "99056f37270715f5c7584fd8b46899a2296af9cae92463bf58b8bd1f5a78e553" dependencies = [ "bstr", "itoa", @@ -903,9 +870,9 @@ dependencies = [ [[package]] name = "gix-diff" -version = "0.28.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "585b0834d4b6791a848637c4e109545fda9b0f29b591ba55edb33ceda6e7856b" +checksum = "644a0f2768bc42d7a69289ada80c9e15c589caefc6a315d2307202df83ed1186" dependencies = [ "gix-hash", "gix-object", @@ -915,9 +882,9 @@ dependencies = [ [[package]] name = "gix-discover" -version = "0.15.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91c204adba5ebd211c74735cbb65817d277e154486bac0dffa3701f163b80350" +checksum = "5012710ebdecf6193c6866d6409a3b702a4aa0d78c605bc343590b44ab9962a1" dependencies = [ "bstr", "dunce", @@ -930,9 +897,9 @@ dependencies = [ [[package]] name = "gix-features" -version = "0.28.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e6a9dfa7b3c1a99315203e8b97f8f99f3bd95731590607abeaa5ca31bc41fe3" +checksum = "cf69b0f5c701cc3ae22d3204b671907668f6437ca88862d355eaf9bc47a4f897" dependencies = [ "bytes", "bytesize", @@ -952,21 +919,32 @@ dependencies = [ ] [[package]] +name = "gix-fs" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b37a1832f691fdc09910bd267f9a2e413737c1f9ec68c6e31f9e802616278a9" +dependencies = [ + "gix-features", +] + +[[package]] name = "gix-glob" -version = "0.5.5" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93e43efd776bc543f46f0fd0ca3d920c37af71a764a16f2aebd89765e9ff2993" +checksum = "c07c98204529ac3f24b34754540a852593d2a4c7349008df389240266627a72a" dependencies = [ - "bitflags", + "bitflags 2.1.0", "bstr", + "gix-features", + "gix-path", "serde", ] [[package]] name = "gix-hash" -version = "0.10.3" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c0c5a9f4d621d4f4ea046bb331df5c746ca735b8cae5b234cc2be70ee4dbef0" +checksum = "078eec3ac2808cc03f0bddd2704cb661da5c5dc33b41a9d7947b141d499c7c42" dependencies = [ "hex", "serde", @@ -975,9 +953,9 @@ dependencies = [ [[package]] name = "gix-hashtable" -version = "0.1.2" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9609c1b8f36f12968e6a6098f7cdb52004f7d42d570f47a2d6d7c16612f19acb" +checksum = "afebb85691c6a085b114e01a27f4a61364519298c5826cb87a45c304802299bc" dependencies = [ "gix-hash", "hashbrown 0.13.2", @@ -985,12 +963,25 @@ dependencies = [ ] [[package]] +name = "gix-ignore" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba205b6df563e2906768bb22834c82eb46c5fdfcd86ba2c347270bc8309a05b2" +dependencies = [ + "bstr", + "gix-glob", + "gix-path", + "serde", + "unicode-bom", +] + +[[package]] name = "gix-index" -version = "0.14.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c12caf7886c7ba06f2b28835cdc2be1dca86bd047d00299d2d49e707ce1c2616" +checksum = "fa282756760f79c401d4f4f42588fbb4aa27bbb4b0830f3b4d3480c21a4ac5a7" dependencies = [ - "bitflags", + "bitflags 2.1.0", "bstr", "btoi", "filetime", @@ -1009,20 +1000,20 @@ dependencies = [ [[package]] name = "gix-lock" -version = "4.0.0" +version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66119ff8a4a395d0ea033fef718bc85f8b4f0855874f4ce1e005fc16cfe1f66e" +checksum = "2c693d7f05730fa74a7c467150adc7cea393518410c65f0672f80226b8111555" dependencies = [ - "fastrand", "gix-tempfile", + "gix-utils", "thiserror", ] [[package]] name = "gix-mailmap" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b66aea5e52875cd4915f4957a6f4b75831a36981e2ec3f5fad9e370e444fe1a" +checksum = "e8856cec3bdc3610c06970d28b6cb20a0c6621621cf9a8ec48cbd23f2630f362" dependencies = [ "bstr", "gix-actor", @@ -1032,9 +1023,9 @@ dependencies = [ [[package]] name = "gix-object" -version = "0.28.0" +version = "0.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8df068db9180ee935fbb70504848369e270bdcb576b05c0faa8b9fd3b86fc017" +checksum = "c9bb30ce0818d37096daa29efe361a4bc6dd0b51a5726598898be7e9a40a01e1" dependencies = [ "bstr", "btoi", @@ -1052,9 +1043,9 @@ dependencies = [ [[package]] name = "gix-odb" -version = "0.42.0" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9a5f9e1afbd509761977a2ea02869cedaaba500b4e783deb2e4de5179a55a80" +checksum = "bca2f324aa67672b6d0f2c0fa93f96eb6a7029d260e4c1df5dce3c015f5e5add" dependencies = [ "arc-swap", "gix-features", @@ -1071,9 +1062,9 @@ dependencies = [ [[package]] name = "gix-pack" -version = "0.32.0" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51db84e1459a8022e518d40a8778028d793dbb28e4d35c9a5eaf92658fb0775" +checksum = "164a515900a83257ae4aa80e741655bee7a2e39113fb535d7a5ac623b445ff20" dependencies = [ "clru", "gix-chunk", @@ -1095,9 +1086,9 @@ dependencies = [ [[package]] name = "gix-packetline" -version = "0.14.3" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d63e5e5a9a92d4fc6b63ff9d94954d25c779ce25c98d5bbe2e4399aa42f7073c" +checksum = "51f53abaf1171d2fe99f80ac8ed6645904a1bfd706674749ac112bdd2d4f0777" dependencies = [ "bstr", "futures-io", @@ -1109,32 +1100,34 @@ dependencies = [ [[package]] name = "gix-path" -version = "0.7.2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6c104a66dec149cb8f7aaafc6ab797654cf82d67f050fd0cb7e7294e328354b" +checksum = "4fc78f47095a0c15aea0e66103838f0748f4494bf7a9555dfe0f00425400396c" dependencies = [ "bstr", + "home", + "once_cell", "thiserror", ] [[package]] name = "gix-prompt" -version = "0.3.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a20cebf73229debaa82574c4fd20dcaf00fa8d4bfce823a862c4e990d7a0b5b4" +checksum = "330d11fdf88fff3366c2491efde2f3e454958efe7d5ddf60272e8fb1d944bb01" dependencies = [ "gix-command", "gix-config-value", - "nix", "parking_lot", + "rustix", "thiserror", ] [[package]] name = "gix-protocol" -version = "0.28.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d372ab11d5d28ac21800e3f1a6603a67c1ead57f6f5fab07e1e73e960f331c1" +checksum = "877e49417f1730f4dbc2f7d9a2ab0f8b2f49ef08f97270691403ecde3d961e3a" dependencies = [ "async-trait", "bstr", @@ -1164,12 +1157,13 @@ dependencies = [ [[package]] name = "gix-ref" -version = "0.26.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90a0ed29e581f04b904ecd0c32b11f33b8209b5a0af9c43f415249a4f2fba632" +checksum = "b8212ecfe41815a2f1b059d82171d6276758cfac5506a5e0f04ad45ef0b1924a" dependencies = [ "gix-actor", "gix-features", + "gix-fs", "gix-hash", "gix-lock", "gix-object", @@ -1184,9 +1178,9 @@ dependencies = [ [[package]] name = "gix-refspec" -version = "0.9.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aba332462bda2e8efeae4302b39a6ed01ad56ef772fd5b7ef197cf2798294d65" +checksum = "0a6ea733820df67e4cd7797deb12727905824d8f5b7c59d943c456d314475892" dependencies = [ "bstr", "gix-hash", @@ -1198,9 +1192,9 @@ dependencies = [ [[package]] name = "gix-revision" -version = "0.12.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed98e4a0254953c64bc913bd23146a1de662067d5cf974cbdde396958b39e5b0" +checksum = "810f35e9afeccca999d5d348b239f9c162353127d2e13ff3240e31b919e35476" dependencies = [ "bstr", "gix-date", @@ -1213,12 +1207,11 @@ dependencies = [ [[package]] name = "gix-sec" -version = "0.6.2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8ffa5bf0772f9b01de501c035b6b084cf9b8bb07dec41e3afc6a17336a65f47" +checksum = "794520043d5a024dfeac335c6e520cb616f6963e30dab995892382e998c12897" dependencies = [ - "bitflags", - "dirs", + "bitflags 2.1.0", "gix-path", "libc", "serde", @@ -1227,11 +1220,12 @@ dependencies = [ [[package]] name = "gix-tempfile" -version = "4.1.0" +version = "5.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8e0227bd284cd16105e8479602bb8af6bddcb800427e881c1feee4806310a31" +checksum = "d71a0d32f34e71e86586124225caefd78dabc605d0486de580d717653addf182" dependencies = [ "dashmap", + "gix-fs", "libc", "once_cell", "parking_lot", @@ -1242,9 +1236,9 @@ dependencies = [ [[package]] name = "gix-transport" -version = "0.27.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d633947b36a2fbbc089195bdc71621158f1660c2ff2a6b12b0279c16e2f764bc" +checksum = "f01c2bf7b989c679695ef635fc7d9e80072e08101be4b53193c8e8b649900102" dependencies = [ "async-std", "async-trait", @@ -1268,9 +1262,9 @@ dependencies = [ [[package]] name = "gix-traverse" -version = "0.24.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd9a4a07bb22168dc79c60e1a6a41919d198187ca83d8a5940ad8d7122a45df3" +checksum = "a5be1e807f288c33bb005075111886cceb43ed8a167b3182a0f62c186e2a0dd1" dependencies = [ "gix-hash", "gix-hashtable", @@ -1280,9 +1274,9 @@ dependencies = [ [[package]] name = "gix-url" -version = "0.15.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "044072b7ce8601b62dcec841b92129f5cc677072823324121b395d766ac5f528" +checksum = "dfc77f89054297cc81491e31f1bab4027e554b5ef742a44bd7035db9a0f78b76" dependencies = [ "bstr", "gix-features", @@ -1294,10 +1288,19 @@ dependencies = [ ] [[package]] +name = "gix-utils" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c10b69beac219acb8df673187a1f07dde2d74092f974fb3f9eb385aeb667c909" +dependencies = [ + "fastrand", +] + +[[package]] name = "gix-validate" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b69ddb780ea1465255e66818d75b7098371c58dbc9560da4488a44b9f5c7e443" +checksum = "7bd629d3680773e1785e585d76fd4295b740b559cad9141517300d99a0c8c049" dependencies = [ "bstr", "thiserror", @@ -1305,19 +1308,23 @@ dependencies = [ [[package]] name = "gix-worktree" -version = "0.14.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7cb9af6e56152953d8fe113c4f9d7cf60cf7a982362711e9200a255579b49cb" +checksum = "10bf56a1f5037d84293ea6cece61d9f27c4866b1e13c1c95f37cf56b7da7af25" dependencies = [ "bstr", + "filetime", "gix-attributes", "gix-features", + "gix-fs", "gix-glob", "gix-hash", + "gix-ignore", "gix-index", "gix-object", "gix-path", "io-close", + "serde", "thiserror", ] @@ -1335,9 +1342,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.16" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5be7b54589b581f624f566bf5d8eb2bab1db736c51528720b6bd36b96b55924d" +checksum = "17f8a914c2987b688368b5138aa05321db91f4090cf26118185672ad588bce21" dependencies = [ "bytes", "fnv", @@ -1380,6 +1387,12 @@ dependencies = [ ] [[package]] +name = "hermit-abi" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" + +[[package]] name = "hex" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1447,9 +1460,9 @@ checksum = "86cce260d758a9aa3d7c4b99d55c815a540f8a37514ba6046ab6be402a157cb0" [[package]] name = "hyper" -version = "0.14.24" +version = "0.14.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e011372fa0b68db8350aa7a248930ecc7839bf46d8485577d69f117a75f164c" +checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4" dependencies = [ "bytes", "futures-channel", @@ -1528,9 +1541,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.9.2" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", "hashbrown 0.12.3", @@ -1557,12 +1570,13 @@ dependencies = [ [[package]] name = "io-lifetimes" -version = "1.0.5" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1abeb7a0dd0f8181267ff8adc397075586500b81b28a73e8a0208b00fc170fb3" +checksum = "9c66c74d2ae7e79a5a8f7ac924adbe38ee42a859c6539ad869eb51f0b52dc220" dependencies = [ + "hermit-abi 0.3.1", "libc", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] @@ -1579,9 +1593,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.7.1" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30e22bd8629359895450b59ea7a776c850561b96a3b1d31321c1949d9e6c9146" +checksum = "12b6ee2129af8d4fb011108c73d99a1b83a85977f23b82460c0ae2e25bb4b57f" [[package]] name = "is_ci" @@ -1615,6 +1629,16 @@ dependencies = [ ] [[package]] +name = "kstring" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec3066350882a1cd6d950d055997f379ac37fd39f81cd4d8ed186032eb3c5747" +dependencies = [ + "serde", + "static_assertions", +] + +[[package]] name = "kv-log-macro" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1631,9 +1655,19 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.139" +version = "0.2.142" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" +checksum = "6a987beff54b60ffa6d51982e1aa1146bc42f19bd26be28b0586f252fccf5317" + +[[package]] +name = "libz-ng-sys" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4399ae96a9966bf581e726de86969f803a81b7ce795fcd5480e640589457e0f2" +dependencies = [ + "cmake", + "libc", +] [[package]] name = "libz-sys" @@ -1642,7 +1676,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9702761c3935f8cc2f101793272e202c72b99da8f4224a19ddcf1279a6450bbf" dependencies = [ "cc", - "cmake", "libc", "pkg-config", "vcpkg", @@ -1656,9 +1689,9 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "linux-raw-sys" -version = "0.1.4" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" +checksum = "9b085a4f2cde5781fc4b1717f2e86c62f5cda49de7ba99a7c2eae02b61c9064c" [[package]] name = "litrs" @@ -1715,7 +1748,7 @@ checksum = "0f1b8c13cb1f814b634a96b2c725449fe7ed464a7b8781de8688be5ffbd3f305" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -1744,9 +1777,9 @@ dependencies = [ [[package]] name = "mime" -version = "0.3.16" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "minimal-lexical" @@ -1794,18 +1827,6 @@ dependencies = [ ] [[package]] -name = "nix" -version = "0.26.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" -dependencies = [ - "bitflags", - "cfg-if", - "libc", - "static_assertions", -] - -[[package]] name = "nom" version = "7.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1830,7 +1851,7 @@ version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" dependencies = [ - "hermit-abi", + "hermit-abi 0.2.6", "libc", ] @@ -1851,11 +1872,11 @@ checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" [[package]] name = "openssl" -version = "0.10.45" +version = "0.10.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b102428fd03bc5edf97f62620f7298614c45cedf287c271e7ed450bbaf83f2e1" +checksum = "97ea2d98598bf9ada7ea6ee8a30fb74f9156b63bbe495d64ec2b87c269d2dda3" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg-if", "foreign-types", "libc", @@ -1866,13 +1887,13 @@ dependencies = [ [[package]] name = "openssl-macros" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.15", ] [[package]] @@ -1883,11 +1904,10 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.80" +version = "0.9.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23bbbf7854cd45b83958ebe919f0e8e516793727652e27fda10a8384cfc790b7" +checksum = "992bac49bdbab4423199c654a5515bd2a6c6a23bf03f2dd3bdb7e5ae6259bc69" dependencies = [ - "autocfg", "cc", "libc", "pkg-config", @@ -1896,9 +1916,9 @@ dependencies = [ [[package]] name = "parking" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" +checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e" [[package]] name = "parking_lot" @@ -1918,7 +1938,7 @@ checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.2.16", "smallvec", "windows-sys 0.45.0", ] @@ -1949,16 +1969,18 @@ checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" [[package]] name = "polling" -version = "2.5.2" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22122d5ec4f9fe1b3916419b76be1e80bcb93f618d071d2edf841b137b2a2bd6" +checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" dependencies = [ "autocfg", + "bitflags 1.3.2", "cfg-if", + "concurrent-queue", "libc", "log", - "wepoll-ffi", - "windows-sys 0.42.0", + "pin-project-lite", + "windows-sys 0.48.0", ] [[package]] @@ -1969,18 +1991,18 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "proc-macro2" -version = "1.0.51" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d727cae5b39d21da60fa540906919ad737832fe0b1c165da3a34d6548c849d6" +checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" dependencies = [ "unicode-ident", ] [[package]] name = "prodash" -version = "23.1.1" +version = "23.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d73c6b64cb5b99eb63ca97d378685712617ec0172ff5c04cd47a489d3e2c51f8" +checksum = "9516b775656bc3e8985e19cd4b8c0c0de045095074e453d2c0a513b5f978392d" dependencies = [ "bytesize", "human_format", @@ -1995,9 +2017,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quote" -version = "1.0.23" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" dependencies = [ "proc-macro2", ] @@ -2060,25 +2082,23 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] -name = "redox_users" -version = "0.4.3" +name = "redox_syscall" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" dependencies = [ - "getrandom", - "redox_syscall", - "thiserror", + "bitflags 1.3.2", ] [[package]] name = "regex" -version = "1.7.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733" +checksum = "ac6cf59af1067a3fb53fbe5c88c053764e930f932be1d71d3ffe032cbe147f59" dependencies = [ "regex-syntax", ] @@ -2091,15 +2111,15 @@ checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" [[package]] name = "regex-syntax" -version = "0.6.28" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" +checksum = "b6868896879ba532248f33598de5181522d8b3d9d724dfd230911e1a7d4822f5" [[package]] name = "reqwest" -version = "0.11.14" +version = "0.11.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21eed90ec8570952d53b772ecf8f206aa1ec9a3d76b2521c56c42973f2d91ee9" +checksum = "27b71749df584b7f4cac2c426c127a7c785a5106cc98f7a8feb044115f0fa254" dependencies = [ "base64", "bytes", @@ -2165,16 +2185,16 @@ dependencies = [ [[package]] name = "rustix" -version = "0.36.9" +version = "0.37.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd5c6ff11fecd55b40746d1995a02f2eb375bf8c00d192d521ee09f42bef37bc" +checksum = "f79bef90eb6d984c72722595b5b1348ab39275a5e5123faca6863bf07d75a4e0" dependencies = [ - "bitflags", + "bitflags 1.3.2", "errno", "io-lifetimes", "libc", "linux-raw-sys", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] @@ -2244,7 +2264,7 @@ version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-foundation-sys", "libc", @@ -2263,29 +2283,29 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.152" +version = "1.0.160" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" +checksum = "bb2f3770c8bce3bcda7e149193a069a0f4365bda1fa5cd88e03bca26afc1216c" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.152" +version = "1.0.160" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" +checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.15", ] [[package]] name = "serde_json" -version = "1.0.93" +version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cad406b69c91885b5107daf2c29572f6c8cdb3c66826821e286c533490c0bc76" +checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" dependencies = [ "itoa", "ryu", @@ -2306,27 +2326,25 @@ dependencies = [ [[package]] name = "serial_test" -version = "1.0.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "538c30747ae860d6fb88330addbbd3e0ddbe46d662d032855596d8a8ca260611" +checksum = "0e56dd856803e253c8f298af3f4d7eb0ae5e23a737252cd90bb4f3b435033b2d" dependencies = [ "dashmap", - "futures", "lazy_static", - "log", "parking_lot", "serial_test_derive", ] [[package]] name = "serial_test_derive" -version = "1.0.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "079a83df15f85d89a68d64ae1238f142f172b1fa915d0d76b26a7cba1b659a69" +checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.15", ] [[package]] @@ -2427,36 +2445,47 @@ dependencies = [ ] [[package]] +name = "syn" +version = "2.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] name = "tempfile" -version = "3.4.0" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af18f7ae1acd354b992402e9ec5864359d693cd8a79dcbef59f76891701c1e95" +checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998" dependencies = [ "cfg-if", "fastrand", - "redox_syscall", + "redox_syscall 0.3.5", "rustix", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] name = "thiserror" -version = "1.0.38" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0" +checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.38" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" +checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.15", ] [[package]] @@ -2505,14 +2534,13 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.26.0" +version = "1.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03201d01c3c27a29c8a5cee5b55a93ddae1ccf6f08f65365c2c918f8c1b76f64" +checksum = "d0de47a4eecbe11f498978a9b29d792f0d2692d1dd003650c24c76510e3bc001" dependencies = [ "autocfg", "bytes", "libc", - "memchr", "mio", "num_cpus", "pin-project-lite", @@ -2581,7 +2609,7 @@ checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -2661,21 +2689,21 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.10" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54675592c1dbefd78cbd98db9bacd89886e1ca50692a0692baefffdeb92dd58" +checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-bom" -version = "1.1.4" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63ec69f541d875b783ca40184d655f2927c95f0bffd486faa83cd3ac3529ec32" +checksum = "98e90c70c9f0d4d1ee6d0a7d04aa06cb9bbd53d8cfbdd62a0269a7c2eb640552" [[package]] name = "unicode-ident" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "775c11906edafc97bc378816b94585fbd9a054eabaf86fdd0ced94af449efab7" +checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" [[package]] name = "unicode-normalization" @@ -2733,12 +2761,11 @@ checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" [[package]] name = "walkdir" -version = "2.3.2" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" dependencies = [ "same-file", - "winapi", "winapi-util", ] @@ -2779,7 +2806,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn", + "syn 1.0.109", "wasm-bindgen-shared", ] @@ -2813,7 +2840,7 @@ checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2854,15 +2881,6 @@ dependencies = [ ] [[package]] -name = "wepoll-ffi" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d743fdedc5c64377b5fc2bc036b01c7fd642205a0d96356034ae3404d49eb7fb" -dependencies = [ - "cc", -] - -[[package]] name = "widestring" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2901,17 +2919,11 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows" -version = "0.43.0" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04662ed0e3e5630dfa9b26e4cb823b817f1a9addda855d973a9458c236556244" +checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows-targets 0.48.0", ] [[package]] @@ -2920,13 +2932,13 @@ version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", ] [[package]] @@ -2935,65 +2947,131 @@ version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" dependencies = [ - "windows-targets", + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.0", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", ] [[package]] name = "windows-targets" -version = "0.42.1" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7" +checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.48.0", + "windows_aarch64_msvc 0.48.0", + "windows_i686_gnu 0.48.0", + "windows_i686_msvc 0.48.0", + "windows_x86_64_gnu 0.48.0", + "windows_x86_64_gnullvm 0.48.0", + "windows_x86_64_msvc 0.48.0", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.1" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_aarch64_msvc" -version = "0.42.1" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" -version = "0.42.1" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" [[package]] name = "windows_i686_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" -version = "0.42.1" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.1" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" -version = "0.42.1" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" [[package]] name = "winreg" diff --git a/vendor/gix/Cargo.toml b/vendor/gix/Cargo.toml index 6341d11a7..599798829 100644 --- a/vendor/gix/Cargo.toml +++ b/vendor/gix/Cargo.toml @@ -13,7 +13,7 @@ edition = "2021" rust-version = "1.64" name = "gix" -version = "0.39.0" +version = "0.44.1" authors = ["Sebastian Thiel <sebastian.thiel@icloud.com>"] include = [ "src/**/*", @@ -28,7 +28,7 @@ features = [ "document-features", "max-performance", "blocking-network-client", - "serde1", + "serde", ] rustdoc-args = [ "--cfg", @@ -63,103 +63,112 @@ version = "0.2.0" optional = true [dependencies.gix-actor] -version = "^0.19.0" +version = "^0.20.0" [dependencies.gix-attributes] -version = "^0.10.0" +version = "^0.12.0" [dependencies.gix-config] -version = "^0.18.0" +version = "^0.22.0" [dependencies.gix-credentials] -version = "^0.11.0" +version = "^0.14.0" [dependencies.gix-date] -version = "^0.4.3" +version = "^0.5.0" [dependencies.gix-diff] -version = "^0.28.0" +version = "^0.29.0" [dependencies.gix-discover] -version = "^0.15.0" +version = "^0.18.0" [dependencies.gix-features] -version = "^0.28.0" +version = "^0.29.0" features = [ "progress", "once_cell", ] +[dependencies.gix-fs] +version = "^0.1.1" + [dependencies.gix-glob] -version = "^0.5.5" +version = "^0.7.0" [dependencies.gix-hash] -version = "^0.10.3" +version = "^0.11.1" [dependencies.gix-hashtable] -version = "^0.1.2" +version = "^0.2.0" + +[dependencies.gix-ignore] +version = "^0.2.0" [dependencies.gix-index] -version = "^0.14.0" +version = "^0.16.0" [dependencies.gix-lock] -version = "^4.0.0" +version = "^5.0.0" [dependencies.gix-mailmap] -version = "^0.11.0" +version = "^0.12.0" [dependencies.gix-object] -version = "^0.28.0" +version = "^0.29.1" [dependencies.gix-odb] -version = "^0.42.0" +version = "^0.45.0" [dependencies.gix-pack] -version = "^0.32.0" +version = "^0.35.0" features = ["object-cache-dynamic"] [dependencies.gix-path] -version = "^0.7.2" +version = "^0.8.0" [dependencies.gix-prompt] -version = "^0.3.2" +version = "^0.5.0" [dependencies.gix-protocol] -version = "^0.28.0" +version = "^0.32.0" optional = true [dependencies.gix-ref] -version = "^0.26.0" +version = "^0.29.0" [dependencies.gix-refspec] -version = "^0.9.0" +version = "^0.10.1" [dependencies.gix-revision] -version = "^0.12.0" +version = "^0.13.0" [dependencies.gix-sec] -version = "^0.6.2" +version = "^0.8.0" [dependencies.gix-tempfile] -version = "^4.0.0" +version = "^5.0.0" features = ["signals"] default-features = false [dependencies.gix-transport] -version = "^0.27.0" +version = "^0.31.0" optional = true [dependencies.gix-traverse] -version = "^0.24.0" +version = "^0.25.0" [dependencies.gix-url] -version = "^0.15.0" +version = "^0.18.0" + +[dependencies.gix-utils] +version = "^0.1.1" [dependencies.gix-validate] -version = "^0.7.3" +version = "^0.7.4" [dependencies.gix-worktree] -version = "^0.14.0" +version = "^0.17.0" [dependencies.log] version = "0.4.14" @@ -212,7 +221,8 @@ features = ["attributes"] version = "1.1.1" [dev-dependencies.serial_test] -version = "1.0.0" +version = "2.0.0" +default-features = false [dev-dependencies.walkdir] version = "2.3.2" @@ -255,7 +265,7 @@ fast-sha1 = ["gix-features/fast-sha1"] hp-tempfile-registry = ["gix-tempfile/hp-hashmap"] max-performance = [ "max-performance-safe", - "gix-features/zlib-ng-compat", + "gix-features/zlib-ng", "fast-sha1", ] max-performance-safe = [ @@ -267,20 +277,22 @@ max-performance-safe = [ pack-cache-lru-dynamic = ["gix-pack/pack-cache-lru-dynamic"] pack-cache-lru-static = ["gix-pack/pack-cache-lru-static"] progress-tree = ["prodash/progress-tree"] -serde1 = [ - "serde", - "gix-pack/serde1", - "gix-object/serde1", - "gix-protocol?/serde1", - "gix-transport?/serde1", - "gix-ref/serde1", - "gix-odb/serde1", - "gix-index/serde1", - "gix-mailmap/serde1", - "gix-url/serde1", - "gix-attributes/serde1", - "gix-revision/serde1", - "gix-credentials/serde1", +serde = [ + "dep:serde", + "gix-pack/serde", + "gix-object/serde", + "gix-protocol?/serde", + "gix-transport?/serde", + "gix-ref/serde", + "gix-odb/serde", + "gix-index/serde", + "gix-mailmap/serde", + "gix-url/serde", + "gix-attributes/serde", + "gix-ignore/serde", + "gix-revision/serde", + "gix-worktree/serde", + "gix-credentials/serde", ] [target."cfg(target_vendor = \"apple\")".dependencies.unicode-normalization] diff --git a/vendor/gix/src/attributes.rs b/vendor/gix/src/attributes.rs new file mode 100644 index 000000000..bb8636460 --- /dev/null +++ b/vendor/gix/src/attributes.rs @@ -0,0 +1,9 @@ +/// The error returned by [`Repository::attributes()`][crate::Repository::attributes()]. +#[derive(Debug, thiserror::Error)] +#[allow(missing_docs)] +pub enum Error { + #[error(transparent)] + ConfigureAttributes(#[from] crate::config::attribute_stack::Error), + #[error(transparent)] + ConfigureExcludes(#[from] crate::config::exclude_stack::Error), +} diff --git a/vendor/gix/src/clone/access.rs b/vendor/gix/src/clone/access.rs new file mode 100644 index 000000000..5b6e5fbab --- /dev/null +++ b/vendor/gix/src/clone/access.rs @@ -0,0 +1,61 @@ +use crate::bstr::BString; +use crate::clone::PrepareFetch; +use crate::Repository; + +/// Builder +impl PrepareFetch { + /// Use `f` to apply arbitrary changes to the remote that is about to be used to fetch a pack. + /// + /// The passed in `remote` will be un-named and pre-configured to be a default remote as we know it from git-clone. + /// It is not yet present in the configuration of the repository, + /// but each change it will eventually be written to the configuration prior to performing a the fetch operation, + /// _all changes done in `f()` will be persisted_. + /// + /// It can also be used to configure additional options, like those for fetching tags. Note that + /// [with_fetch_tags()][crate::Remote::with_fetch_tags()] should be called here to configure the clone as desired. + /// Otherwise a clone is configured to be complete and fetches all tags, not only those reachable from all branches. + pub fn configure_remote( + mut self, + f: impl FnMut(crate::Remote<'_>) -> Result<crate::Remote<'_>, Box<dyn std::error::Error + Send + Sync>> + 'static, + ) -> Self { + self.configure_remote = Some(Box::new(f)); + self + } + + /// Set the remote's name to the given value after it was configured using the function provided via + /// [`configure_remote()`][Self::configure_remote()]. + /// + /// If not set here, it defaults to `origin` or the value of `clone.defaultRemoteName`. + pub fn with_remote_name(mut self, name: impl Into<BString>) -> Result<Self, crate::remote::name::Error> { + self.remote_name = Some(crate::remote::name::validated(name)?); + Ok(self) + } + + /// Make this clone a shallow one with the respective choice of shallow-ness. + pub fn with_shallow(mut self, shallow: crate::remote::fetch::Shallow) -> Self { + self.shallow = shallow; + self + } +} + +/// Consumption +impl PrepareFetch { + /// Persist the contained repository as is even if an error may have occurred when fetching from the remote. + pub fn persist(mut self) -> Repository { + self.repo.take().expect("present and consumed once") + } +} + +impl Drop for PrepareFetch { + fn drop(&mut self) { + if let Some(repo) = self.repo.take() { + std::fs::remove_dir_all(repo.work_dir().unwrap_or_else(|| repo.path())).ok(); + } + } +} + +impl From<PrepareFetch> for Repository { + fn from(prep: PrepareFetch) -> Self { + prep.persist() + } +} diff --git a/vendor/gix/src/clone/checkout.rs b/vendor/gix/src/clone/checkout.rs index 50d235f13..823005551 100644 --- a/vendor/gix/src/clone/checkout.rs +++ b/vendor/gix/src/clone/checkout.rs @@ -27,8 +27,7 @@ pub mod main_worktree { CheckoutOptions(#[from] crate::config::checkout_options::Error), #[error(transparent)] IndexCheckout( - #[from] - gix_worktree::index::checkout::Error<gix_odb::find::existing_object::Error<gix_odb::store::find::Error>>, + #[from] gix_worktree::checkout::Error<gix_odb::find::existing_object::Error<gix_odb::store::find::Error>>, ), #[error("Failed to reopen object database as Arc (only if thread-safety wasn't compiled in)")] OpenArcOdb(#[from] std::io::Error), @@ -69,7 +68,7 @@ pub mod main_worktree { &mut self, mut progress: impl crate::Progress, should_interrupt: &AtomicBool, - ) -> Result<(Repository, gix_worktree::index::checkout::Outcome), Error> { + ) -> Result<(Repository, gix_worktree::checkout::Outcome), Error> { let repo = self .repo .as_ref() @@ -82,7 +81,7 @@ pub mod main_worktree { None => { return Ok(( self.repo.take().expect("still present"), - gix_worktree::index::checkout::Outcome::default(), + gix_worktree::checkout::Outcome::default(), )) } }; @@ -103,7 +102,7 @@ pub mod main_worktree { bytes.init(None, crate::progress::bytes()); let start = std::time::Instant::now(); - let outcome = gix_worktree::index::checkout( + let outcome = gix_worktree::checkout( &mut index, workdir, { diff --git a/vendor/gix/src/clone/fetch/mod.rs b/vendor/gix/src/clone/fetch/mod.rs index d663b47ea..59f820675 100644 --- a/vendor/gix/src/clone/fetch/mod.rs +++ b/vendor/gix/src/clone/fetch/mod.rs @@ -1,9 +1,8 @@ -use crate::{bstr::BString, clone::PrepareFetch, Repository}; +use crate::clone::PrepareFetch; /// The error returned by [`PrepareFetch::fetch_only()`]. #[derive(Debug, thiserror::Error)] #[allow(missing_docs)] -#[cfg(feature = "blocking-network-client")] pub enum Error { #[error(transparent)] Connect(#[from] crate::remote::connect::Error), @@ -15,6 +14,8 @@ pub enum Error { RemoteInit(#[from] crate::remote::init::Error), #[error("Custom configuration of remote to clone from failed")] RemoteConfiguration(#[source] Box<dyn std::error::Error + Send + Sync>), + #[error("Custom configuration of connection to use when cloning failed")] + RemoteConnection(#[source] Box<dyn std::error::Error + Send + Sync>), #[error(transparent)] RemoteName(#[from] crate::config::remote::symbolic_name::Error), #[error("Failed to load repo-local git configuration before writing")] @@ -26,7 +27,7 @@ pub enum Error { #[error("The remote HEAD points to a reference named {head_ref_name:?} which is invalid.")] InvalidHeadRef { source: gix_validate::refname::Error, - head_ref_name: BString, + head_ref_name: crate::bstr::BString, }, #[error("Failed to update HEAD with values from remote")] HeadUpdate(#[from] crate::reference::edit::Error), @@ -43,12 +44,11 @@ impl PrepareFetch { /// it was newly initialized. /// /// Note that all data we created will be removed once this instance drops if the operation wasn't successful. - #[cfg(feature = "blocking-network-client")] pub fn fetch_only<P>( &mut self, - progress: P, + mut progress: P, should_interrupt: &std::sync::atomic::AtomicBool, - ) -> Result<(Repository, crate::remote::fetch::Outcome), Error> + ) -> Result<(crate::Repository, crate::remote::fetch::Outcome), Error> where P: crate::Progress, P::SubProgress: 'static, @@ -100,14 +100,19 @@ impl PrepareFetch { ) .expect("valid") .to_owned(); - let pending_pack: remote::fetch::Prepare<'_, '_, _, _> = - remote.connect(remote::Direction::Fetch, progress)?.prepare_fetch({ + let pending_pack: remote::fetch::Prepare<'_, '_, _> = { + let mut connection = remote.connect(remote::Direction::Fetch)?; + if let Some(f) = self.configure_connection.as_mut() { + f(&mut connection).map_err(|err| Error::RemoteConnection(err))?; + } + connection.prepare_fetch(&mut progress, { let mut opts = self.fetch_options.clone(); if !opts.extra_refspecs.contains(&head_refspec) { opts.extra_refspecs.push(head_refspec) } opts - })?; + })? + }; if pending_pack.ref_map().object_hash != repo.object_hash() { unimplemented!("configure repository to expect a different object hash as advertised by the server") } @@ -121,7 +126,8 @@ impl PrepareFetch { .with_reflog_message(RefLogMessage::Override { message: reflog_message.clone(), }) - .receive(should_interrupt)?; + .with_shallow(self.shallow.clone()) + .receive(progress, should_interrupt)?; util::append_config_to_repo_config(repo, config); util::update_head( @@ -135,7 +141,6 @@ impl PrepareFetch { } /// Similar to [`fetch_only()`][Self::fetch_only()`], but passes ownership to a utility type to configure a checkout operation. - #[cfg(feature = "blocking-network-client")] pub fn fetch_then_checkout<P>( &mut self, progress: P, @@ -150,63 +155,5 @@ impl PrepareFetch { } } -/// Builder -impl PrepareFetch { - /// Set additional options to adjust parts of the fetch operation that are not affected by the git configuration. - #[cfg(any(feature = "async-network-client", feature = "blocking-network-client"))] - pub fn with_fetch_options(mut self, opts: crate::remote::ref_map::Options) -> Self { - self.fetch_options = opts; - self - } - /// Use `f` to apply arbitrary changes to the remote that is about to be used to fetch a pack. - /// - /// The passed in `remote` will be un-named and pre-configured to be a default remote as we know it from git-clone. - /// It is not yet present in the configuration of the repository, - /// but each change it will eventually be written to the configuration prior to performing a the fetch operation, - /// _all changes done in `f()` will be persisted_. - /// - /// It can also be used to configure additional options, like those for fetching tags. Note that - /// [with_fetch_tags()][crate::Remote::with_fetch_tags()] should be called here to configure the clone as desired. - /// Otherwise a clone is configured to be complete and fetches all tags, not only those reachable from all branches. - pub fn configure_remote( - mut self, - f: impl FnMut(crate::Remote<'_>) -> Result<crate::Remote<'_>, Box<dyn std::error::Error + Send + Sync>> + 'static, - ) -> Self { - self.configure_remote = Some(Box::new(f)); - self - } - - /// Set the remote's name to the given value after it was configured using the function provided via - /// [`configure_remote()`][Self::configure_remote()]. - /// - /// If not set here, it defaults to `origin` or the value of `clone.defaultRemoteName`. - pub fn with_remote_name(mut self, name: impl Into<BString>) -> Result<Self, crate::remote::name::Error> { - self.remote_name = Some(crate::remote::name::validated(name)?); - Ok(self) - } -} - -/// Consumption -impl PrepareFetch { - /// Persist the contained repository as is even if an error may have occurred when fetching from the remote. - pub fn persist(mut self) -> Repository { - self.repo.take().expect("present and consumed once") - } -} - -impl Drop for PrepareFetch { - fn drop(&mut self) { - if let Some(repo) = self.repo.take() { - std::fs::remove_dir_all(repo.work_dir().unwrap_or_else(|| repo.path())).ok(); - } - } -} - -impl From<PrepareFetch> for Repository { - fn from(prep: PrepareFetch) -> Self { - prep.persist() - } -} - #[cfg(feature = "blocking-network-client")] mod util; diff --git a/vendor/gix/src/clone/mod.rs b/vendor/gix/src/clone/mod.rs index 249a66a42..43024e0b4 100644 --- a/vendor/gix/src/clone/mod.rs +++ b/vendor/gix/src/clone/mod.rs @@ -1,10 +1,16 @@ #![allow(clippy::result_large_err)] use std::convert::TryInto; -use crate::{bstr::BString, config::tree::gitoxide}; +use crate::{bstr::BString, config::tree::gitoxide, remote}; type ConfigureRemoteFn = Box<dyn FnMut(crate::Remote<'_>) -> Result<crate::Remote<'_>, Box<dyn std::error::Error + Send + Sync>>>; +#[cfg(any(feature = "async-network-client", feature = "blocking-network-client"))] +type ConfigureConnectionFn = Box< + dyn FnMut( + &mut remote::Connection<'_, '_, Box<dyn gix_protocol::transport::client::Transport + Send>>, + ) -> Result<(), Box<dyn std::error::Error + Send + Sync>>, +>; /// A utility to collect configuration on how to fetch from a remote and initiate a fetch operation. It will delete the newly /// created repository on when dropped without successfully finishing a fetch. @@ -16,12 +22,18 @@ pub struct PrepareFetch { remote_name: Option<BString>, /// A function to configure a remote prior to fetching a pack. configure_remote: Option<ConfigureRemoteFn>, + /// A function to configure a connection before using it. + #[cfg(any(feature = "async-network-client", feature = "blocking-network-client"))] + configure_connection: Option<ConfigureConnectionFn>, /// Options for preparing a fetch operation. #[cfg(any(feature = "async-network-client", feature = "blocking-network-client"))] - fetch_options: crate::remote::ref_map::Options, + fetch_options: remote::ref_map::Options, /// The url to clone from #[cfg_attr(not(feature = "blocking-network-client"), allow(dead_code))] url: gix_url::Url, + /// How to handle shallow clones + #[cfg_attr(not(feature = "blocking-network-client"), allow(dead_code))] + shallow: remote::fetch::Shallow, } /// The error returned by [`PrepareFetch::new()`]. @@ -99,6 +111,9 @@ impl PrepareFetch { repo: Some(repo), remote_name: None, configure_remote: None, + #[cfg(any(feature = "async-network-client", feature = "blocking-network-client"))] + configure_connection: None, + shallow: remote::fetch::Shallow::NoChange, }) } } @@ -111,7 +126,41 @@ pub struct PrepareCheckout { pub(self) repo: Option<crate::Repository>, } +mod access; + +// This module encapsulates functionality that works with both feature toggles. Can be combined with `fetch` +// once async and clone are a thing. +#[cfg(any(feature = "async-network-client", feature = "blocking-network-client"))] +mod access_feat { + use crate::clone::PrepareFetch; + + /// Builder + impl PrepareFetch { + /// Set a callback to use for configuring the connection to use right before connecting to the remote. + /// + /// It is most commonly used for custom configuration. + // TODO: tests + pub fn configure_connection( + mut self, + f: impl FnMut( + &mut crate::remote::Connection<'_, '_, Box<dyn gix_protocol::transport::client::Transport + Send>>, + ) -> Result<(), Box<dyn std::error::Error + Send + Sync>> + + 'static, + ) -> Self { + self.configure_connection = Some(Box::new(f)); + self + } + + /// Set additional options to adjust parts of the fetch operation that are not affected by the git configuration. + pub fn with_fetch_options(mut self, opts: crate::remote::ref_map::Options) -> Self { + self.fetch_options = opts; + self + } + } +} + /// +#[cfg(feature = "blocking-network-client")] pub mod fetch; /// diff --git a/vendor/gix/src/commit.rs b/vendor/gix/src/commit.rs index 10fa6f675..a58954a36 100644 --- a/vendor/gix/src/commit.rs +++ b/vendor/gix/src/commit.rs @@ -62,9 +62,10 @@ pub mod describe { } /// A selector to choose what kind of references should contribute to names. - #[derive(Debug, Clone, Copy, PartialOrd, PartialEq, Ord, Eq, Hash)] + #[derive(Default, Debug, Clone, Copy, PartialOrd, PartialEq, Ord, Eq, Hash)] pub enum SelectRef { /// Only use annotated tags for names. + #[default] AnnotatedTags, /// Use all tags for names, annotated or plain reference. AllTags, @@ -146,12 +147,6 @@ pub mod describe { } } - impl Default for SelectRef { - fn default() -> Self { - SelectRef::AnnotatedTags - } - } - /// A support type to allow configuring a `git describe` operation pub struct Platform<'repo> { pub(crate) id: gix_hash::ObjectId, diff --git a/vendor/gix/src/config/cache/access.rs b/vendor/gix/src/config/cache/access.rs index 8244eaf27..77324efe3 100644 --- a/vendor/gix/src/config/cache/access.rs +++ b/vendor/gix/src/config/cache/access.rs @@ -1,6 +1,7 @@ #![allow(clippy::result_large_err)] use std::{borrow::Cow, path::PathBuf, time::Duration}; +use gix_attributes::Source; use gix_lock::acquire::Fail; use crate::{ @@ -9,7 +10,7 @@ use crate::{ config::{ cache::util::{ApplyLeniency, ApplyLeniencyDefault}, checkout_options, - tree::{Checkout, Core, Key}, + tree::{gitoxide, Checkout, Core, Key}, Cache, }, remote, @@ -137,7 +138,7 @@ impl Cache { pub(crate) fn checkout_options( &self, git_dir: &std::path::Path, - ) -> Result<gix_worktree::index::checkout::Options, checkout_options::Error> { + ) -> Result<gix_worktree::checkout::Options, checkout_options::Error> { fn boolean( me: &Cache, full_key: &str, @@ -154,63 +155,118 @@ impl Cache { .unwrap_or(default)) } - fn assemble_attribute_globals( - me: &Cache, - _git_dir: &std::path::Path, - ) -> Result<gix_attributes::MatchGroup, checkout_options::Error> { - let _attributes_file = match me - .trusted_file_path("core", None, Core::ATTRIBUTES_FILE.name) - .transpose()? - { - Some(attributes) => Some(attributes.into_owned()), - None => me.xdg_config_path("attributes").ok().flatten(), - }; - // TODO: implement gix_attributes::MatchGroup::<gix_attributes::Attributes>::from_git_dir(), similar to what's done for `Ignore`. - Ok(Default::default()) - } - let thread_limit = self.apply_leniency( self.resolved .integer_filter_by_key("checkout.workers", &mut self.filter_config_section.clone()) .map(|value| Checkout::WORKERS.try_from_workers(value)), )?; - Ok(gix_worktree::index::checkout::Options { - fs: gix_worktree::fs::Capabilities { - precompose_unicode: boolean(self, "core.precomposeUnicode", &Core::PRECOMPOSE_UNICODE, false)?, - ignore_case: boolean(self, "core.ignoreCase", &Core::IGNORE_CASE, false)?, - executable_bit: boolean(self, "core.fileMode", &Core::FILE_MODE, true)?, - symlink: boolean(self, "core.symlinks", &Core::SYMLINKS, true)?, - }, + let capabilities = gix_fs::Capabilities { + precompose_unicode: boolean(self, "core.precomposeUnicode", &Core::PRECOMPOSE_UNICODE, false)?, + ignore_case: boolean(self, "core.ignoreCase", &Core::IGNORE_CASE, false)?, + executable_bit: boolean(self, "core.fileMode", &Core::FILE_MODE, true)?, + symlink: boolean(self, "core.symlinks", &Core::SYMLINKS, true)?, + }; + Ok(gix_worktree::checkout::Options { + attributes: self + .assemble_attribute_globals( + git_dir, + gix_worktree::cache::state::attributes::Source::IdMappingThenWorktree, + self.attributes, + )? + .0, + fs: capabilities, thread_limit, destination_is_initially_empty: false, overwrite_existing: false, keep_going: false, - trust_ctime: boolean(self, "core.trustCTime", &Core::TRUST_C_TIME, true)?, - check_stat: self - .apply_leniency( - self.resolved - .string("core", None, "checkStat") - .map(|v| Core::CHECK_STAT.try_into_checkstat(v)), - )? - .unwrap_or(true), - attribute_globals: assemble_attribute_globals(self, git_dir)?, + stat_options: gix_index::entry::stat::Options { + trust_ctime: boolean(self, "core.trustCTime", &Core::TRUST_C_TIME, true)?, + use_nsec: boolean(self, "gitoxide.core.useNsec", &gitoxide::Core::USE_NSEC, false)?, + use_stdev: boolean(self, "gitoxide.core.useStdev", &gitoxide::Core::USE_STDEV, false)?, + check_stat: self + .apply_leniency( + self.resolved + .string("core", None, "checkStat") + .map(|v| Core::CHECK_STAT.try_into_checkstat(v)), + )? + .unwrap_or(true), + }, }) } + + pub(crate) fn assemble_exclude_globals( + &self, + git_dir: &std::path::Path, + overrides: Option<gix_ignore::Search>, + source: gix_worktree::cache::state::ignore::Source, + buf: &mut Vec<u8>, + ) -> Result<gix_worktree::cache::state::Ignore, config::exclude_stack::Error> { + let excludes_file = match self.excludes_file().transpose()? { + Some(user_path) => Some(user_path), + None => self.xdg_config_path("ignore")?, + }; + Ok(gix_worktree::cache::state::Ignore::new( + overrides.unwrap_or_default(), + gix_ignore::Search::from_git_dir(git_dir, excludes_file, buf)?, + None, + source, + )) + } + // TODO: at least one test, maybe related to core.attributesFile configuration. + pub(crate) fn assemble_attribute_globals( + &self, + git_dir: &std::path::Path, + source: gix_worktree::cache::state::attributes::Source, + attributes: crate::open::permissions::Attributes, + ) -> Result<(gix_worktree::cache::state::Attributes, Vec<u8>), config::attribute_stack::Error> { + let configured_or_user_attributes = match self + .trusted_file_path("core", None, Core::ATTRIBUTES_FILE.name) + .transpose()? + { + Some(attributes) => Some(attributes), + None => { + if attributes.git { + self.xdg_config_path("attributes").ok().flatten().map(Cow::Owned) + } else { + None + } + } + }; + let attribute_files = [gix_attributes::Source::GitInstallation, gix_attributes::Source::System] + .into_iter() + .filter(|source| match source { + Source::GitInstallation => attributes.git_binary, + Source::System => attributes.system, + Source::Git | Source::Local => unreachable!("we don't offer turning this off right now"), + }) + .filter_map(|source| source.storage_location(&mut Self::make_source_env(self.environment))) + .chain(configured_or_user_attributes); + let info_attributes_path = git_dir.join("info").join("attributes"); + let mut buf = Vec::new(); + let mut collection = gix_attributes::search::MetadataCollection::default(); + let res = gix_worktree::cache::state::Attributes::new( + gix_attributes::Search::new_globals(attribute_files, &mut buf, &mut collection)?, + Some(info_attributes_path), + source, + collection, + ); + Ok((res, buf)) + } + pub(crate) fn xdg_config_path( &self, resource_file_name: &str, ) -> Result<Option<PathBuf>, gix_sec::permission::Error<PathBuf>> { std::env::var_os("XDG_CONFIG_HOME") - .map(|path| (PathBuf::from(path), &self.xdg_config_home_env)) + .map(|path| (PathBuf::from(path), &self.environment.xdg_config_home)) .or_else(|| { - std::env::var_os("HOME").map(|path| { + gix_path::env::home_dir().map(|mut p| { ( { - let mut p = PathBuf::from(path); p.push(".config"); p }, - &self.home_env, + &self.environment.home, ) }) }) @@ -226,8 +282,6 @@ impl Cache { /// We never fail for here even if the permission is set to deny as we `gix-config` will fail later /// if it actually wants to use the home directory - we don't want to fail prematurely. pub(crate) fn home_dir(&self) -> Option<PathBuf> { - std::env::var_os("HOME") - .map(PathBuf::from) - .and_then(|path| self.home_env.check_opt(path)) + gix_path::env::home_dir().and_then(|path| self.environment.home.check_opt(path)) } } diff --git a/vendor/gix/src/config/cache/incubate.rs b/vendor/gix/src/config/cache/incubate.rs index 047f2132b..44c537b50 100644 --- a/vendor/gix/src/config/cache/incubate.rs +++ b/vendor/gix/src/config/cache/incubate.rs @@ -30,6 +30,7 @@ impl StageOne { gix_config::Source::Local, git_dir_trust, lossy, + lenient, )?; // Note that we assume the repo is bare by default unless we are told otherwise. This is relevant if @@ -64,6 +65,7 @@ impl StageOne { gix_config::Source::Worktree, git_dir_trust, lossy, + lenient, )?; config.append(worktree_config); }; @@ -86,24 +88,48 @@ fn load_config( source: gix_config::Source, git_dir_trust: gix_sec::Trust, lossy: Option<bool>, + lenient: bool, ) -> Result<gix_config::File<'static>, Error> { - buf.clear(); let metadata = gix_config::file::Metadata::from(source) .at(&config_path) .with(git_dir_trust); let mut file = match std::fs::File::open(&config_path) { Ok(f) => f, Err(err) if err.kind() == std::io::ErrorKind::NotFound => return Ok(gix_config::File::new(metadata)), - Err(err) => return Err(err.into()), + Err(err) => { + let err = Error::Io { + source: err, + path: config_path, + }; + if lenient { + log::warn!("ignoring: {err:#?}"); + return Ok(gix_config::File::new(metadata)); + } else { + return Err(err); + } + } + }; + + buf.clear(); + if let Err(err) = std::io::copy(&mut file, buf) { + let err = Error::Io { + source: err, + path: config_path, + }; + if lenient { + log::warn!("ignoring: {err:#?}"); + buf.clear(); + } else { + return Err(err); + } }; - std::io::copy(&mut file, buf)?; let config = gix_config::File::from_bytes_owned( buf, metadata, gix_config::file::init::Options { includes: gix_config::file::includes::Options::no_follow(), - ..util::base_options(lossy) + ..util::base_options(lossy, lenient) }, )?; diff --git a/vendor/gix/src/config/cache/init.rs b/vendor/gix/src/config/cache/init.rs index dc76f78bb..ee20e0354 100644 --- a/vendor/gix/src/config/cache/init.rs +++ b/vendor/gix/src/config/cache/init.rs @@ -1,5 +1,5 @@ #![allow(clippy::result_large_err)] -use std::borrow::Cow; +use std::{borrow::Cow, ffi::OsString}; use gix_sec::Permission; @@ -12,7 +12,7 @@ use crate::{ tree::{gitoxide, Core, Http}, Cache, }, - repository, + open, }; /// Initialization @@ -32,23 +32,24 @@ impl Cache { filter_config_section: fn(&gix_config::file::Metadata) -> bool, git_install_dir: Option<&std::path::Path>, home: Option<&std::path::Path>, - repository::permissions::Environment { + environment @ open::permissions::Environment { git_prefix, - home: home_env, - xdg_config_home: xdg_config_home_env, ssh_prefix: _, + xdg_config_home: _, + home: _, http_transport, identity, objects, - }: repository::permissions::Environment, - repository::permissions::Config { + }: open::permissions::Environment, + attributes: open::permissions::Attributes, + open::permissions::Config { git_binary: use_installation, system: use_system, git: use_git, user: use_user, env: use_env, includes: use_includes, - }: repository::permissions::Config, + }: open::permissions::Config, lenient_config: bool, api_config_overrides: &[BString], cli_config_overrides: &[BString], @@ -65,12 +66,10 @@ impl Cache { } else { gix_config::file::includes::Options::no_follow() }, - ..util::base_options(lossy) + ..util::base_options(lossy, lenient_config) }; let config = { - let home_env = &home_env; - let xdg_config_home_env = &xdg_config_home_env; let git_prefix = &git_prefix; let metas = [ gix_config::source::Kind::GitInstallation, @@ -88,15 +87,7 @@ impl Cache { _ => {} } source - .storage_location(&mut |name| { - match name { - git_ if git_.starts_with("GIT_") => Some(git_prefix), - "XDG_CONFIG_HOME" => Some(xdg_config_home_env), - "HOME" => Some(home_env), - _ => None, - } - .and_then(|perm| perm.check_opt(name).and_then(std::env::var_os)) - }) + .storage_location(&mut Self::make_source_env(environment)) .map(|p| (source, p.into_owned())) }) .map(|(source, path)| gix_config::file::Metadata { @@ -118,7 +109,7 @@ impl Cache { ) .map_err(|err| match err { gix_config::file::init::from_paths::Error::Init(err) => Error::from(err), - gix_config::file::init::from_paths::Error::Io(err) => err.into(), + gix_config::file::init::from_paths::Error::Io { source, path } => Error::Io { source, path }, })? .unwrap_or_default(); @@ -175,9 +166,9 @@ impl Cache { ignore_case, hex_len, filter_config_section, - xdg_config_home_env, - home_env, + environment, lenient_config, + attributes, user_agent: Default::default(), personas: Default::default(), url_rewrite: Default::default(), @@ -240,6 +231,31 @@ impl Cache { Ok(()) } + + pub(crate) fn make_source_env( + crate::open::permissions::Environment { + xdg_config_home, + git_prefix, + home, + .. + }: open::permissions::Environment, + ) -> impl FnMut(&str) -> Option<OsString> { + move |name| { + match name { + git_ if git_.starts_with("GIT_") => Some(git_prefix), + "XDG_CONFIG_HOME" => Some(xdg_config_home), + "HOME" => { + return if home.is_allowed() { + gix_path::env::home_dir().map(Into::into) + } else { + None + } + } + _ => None, + } + .and_then(|perm| perm.check_opt(name).and_then(gix_path::env::var)) + } + } } impl crate::Repository { @@ -349,6 +365,15 @@ fn apply_environment_overrides( ), ( "gitoxide", + Some(Cow::Borrowed("core".into())), + git_prefix, + &[{ + let key = &gitoxide::Core::SHALLOW_FILE; + (env(key), key.name) + }], + ), + ( + "gitoxide", Some(Cow::Borrowed("author".into())), identity, &[ diff --git a/vendor/gix/src/config/cache/util.rs b/vendor/gix/src/config/cache/util.rs index c12f850e6..d5a0a4acb 100644 --- a/vendor/gix/src/config/cache/util.rs +++ b/vendor/gix/src/config/cache/util.rs @@ -17,9 +17,10 @@ pub(crate) fn interpolate_context<'a>( } } -pub(crate) fn base_options(lossy: Option<bool>) -> gix_config::file::init::Options<'static> { +pub(crate) fn base_options(lossy: Option<bool>, lenient: bool) -> gix_config::file::init::Options<'static> { gix_config::file::init::Options { lossy: lossy.unwrap_or(!cfg!(debug_assertions)), + ignore_io_errors: lenient, ..Default::default() } } diff --git a/vendor/gix/src/config/mod.rs b/vendor/gix/src/config/mod.rs index 1e2566777..5da569605 100644 --- a/vendor/gix/src/config/mod.rs +++ b/vendor/gix/src/config/mod.rs @@ -62,8 +62,11 @@ pub enum Error { UnsupportedObjectFormat { name: BString }, #[error(transparent)] CoreAbbrev(#[from] abbrev::Error), - #[error("Could not read configuration file")] - Io(#[from] std::io::Error), + #[error("Could not read configuration file at \"{}\"", path.display())] + Io { + source: std::io::Error, + path: std::path::PathBuf, + }, #[error(transparent)] Init(#[from] gix_config::file::init::Error), #[error(transparent)] @@ -110,6 +113,36 @@ pub mod checkout_options { ConfigBoolean(#[from] super::boolean::Error), #[error(transparent)] CheckoutWorkers(#[from] super::checkout::workers::Error), + #[error(transparent)] + Attributes(#[from] super::attribute_stack::Error), + } +} + +/// +pub mod exclude_stack { + use std::path::PathBuf; + + /// The error produced when setting up a stack to query `gitignore` information. + #[derive(Debug, thiserror::Error)] + #[allow(missing_docs)] + pub enum Error { + #[error("Could not read repository exclude")] + Io(#[from] std::io::Error), + #[error(transparent)] + EnvironmentPermission(#[from] gix_sec::permission::Error<PathBuf>), + #[error("The value for `core.excludesFile` could not be read from configuration")] + ExcludesFilePathInterpolation(#[from] gix_config::path::interpolate::Error), + } +} + +/// +pub mod attribute_stack { + /// The error produced when setting up the attribute stack to query `gitattributes`. + #[derive(Debug, thiserror::Error)] + #[allow(missing_docs)] + pub enum Error { + #[error("An attribute file could not be read")] + Io(#[from] std::io::Error), #[error("Failed to interpolate the attribute file configured at `core.attributesFile`")] AttributesFileInterpolation(#[from] gix_config::path::interpolate::Error), } @@ -247,7 +280,7 @@ pub mod checkout { pub mod workers { use crate::config; - /// The error produced when failing to parse the the `checkout.workers` key. + /// The error produced when failing to parse the `checkout.workers` key. pub type Error = config::key::Error<gix_config::value::Error, 'n', 'd'>; } } @@ -446,9 +479,7 @@ pub(crate) struct Cache { /// If true, we should default what's possible if something is misconfigured, on case by case basis, to be more resilient. /// Also available in options! Keep in sync! pub lenient_config: bool, - /// Define how we can use values obtained with `xdg_config(…)` and its `XDG_CONFIG_HOME` variable. - xdg_config_home_env: gix_sec::Permission, - /// Define how we can use values obtained with `xdg_config(…)`. and its `HOME` variable. - home_env: gix_sec::Permission, + attributes: crate::open::permissions::Attributes, + environment: crate::open::permissions::Environment, // TODO: make core.precomposeUnicode available as well. } diff --git a/vendor/gix/src/config/tree/mod.rs b/vendor/gix/src/config/tree/mod.rs index fd769f3ed..b378b8c49 100644 --- a/vendor/gix/src/config/tree/mod.rs +++ b/vendor/gix/src/config/tree/mod.rs @@ -38,6 +38,8 @@ pub(crate) mod root { pub const GITOXIDE: sections::Gitoxide = sections::Gitoxide; /// The `http` section. pub const HTTP: sections::Http = sections::Http; + /// The `index` section. + pub const INDEX: sections::Index = sections::Index; /// The `init` section. pub const INIT: sections::Init = sections::Init; /// The `pack` section. @@ -69,6 +71,7 @@ pub(crate) mod root { &Self::EXTENSIONS, &Self::GITOXIDE, &Self::HTTP, + &Self::INDEX, &Self::INIT, &Self::PACK, &Self::PROTOCOL, @@ -84,9 +87,9 @@ pub(crate) mod root { mod sections; pub use sections::{ - branch, checkout, core, credential, diff, extensions, gitoxide, http, protocol, remote, ssh, Author, Branch, - Checkout, Clone, Committer, Core, Credential, Diff, Extensions, Gitoxide, Http, Init, Pack, Protocol, Remote, Safe, - Ssh, Url, User, + branch, checkout, core, credential, diff, extensions, gitoxide, http, index, protocol, remote, ssh, Author, Branch, + Checkout, Clone, Committer, Core, Credential, Diff, Extensions, Gitoxide, Http, Index, Init, Pack, Protocol, + Remote, Safe, Ssh, Url, User, }; /// Generic value implementations for static instantiation. diff --git a/vendor/gix/src/config/tree/sections/clone.rs b/vendor/gix/src/config/tree/sections/clone.rs index 616185a0b..6cb274e7d 100644 --- a/vendor/gix/src/config/tree/sections/clone.rs +++ b/vendor/gix/src/config/tree/sections/clone.rs @@ -7,6 +7,8 @@ impl Clone { /// The `clone.defaultRemoteName` key. pub const DEFAULT_REMOTE_NAME: keys::RemoteName = keys::RemoteName::new_remote_name("defaultRemoteName", &config::Tree::CLONE); + /// The `clone.rejectShallow` key. + pub const REJECT_SHALLOW: keys::Boolean = keys::Boolean::new_boolean("rejectShallow", &config::Tree::CLONE); } impl Section for Clone { @@ -15,6 +17,6 @@ impl Section for Clone { } fn keys(&self) -> &[&dyn Key] { - &[&Self::DEFAULT_REMOTE_NAME] + &[&Self::DEFAULT_REMOTE_NAME, &Self::REJECT_SHALLOW] } } diff --git a/vendor/gix/src/config/tree/sections/gitoxide.rs b/vendor/gix/src/config/tree/sections/gitoxide.rs index 8c3defd0b..7d60f1287 100644 --- a/vendor/gix/src/config/tree/sections/gitoxide.rs +++ b/vendor/gix/src/config/tree/sections/gitoxide.rs @@ -1,10 +1,15 @@ -use crate::config::tree::{keys, Gitoxide, Key, Section}; +use crate::{ + config, + config::tree::{keys, Gitoxide, Key, Section}, +}; impl Gitoxide { /// The `gitoxide.allow` section. pub const ALLOW: Allow = Allow; /// The `gitoxide.author` section. pub const AUTHOR: Author = Author; + /// The `gitoxide.core` section. + pub const CORE: Core = Core; /// The `gitoxide.commit` section. pub const COMMIT: Commit = Commit; /// The `gitoxide.committer` section. @@ -39,6 +44,7 @@ impl Section for Gitoxide { &[ &Self::ALLOW, &Self::AUTHOR, + &Self::CORE, &Self::COMMIT, &Self::COMMITTER, &Self::HTTP, @@ -56,6 +62,41 @@ mod subsections { Tree, }; + /// The `Core` sub-section. + #[derive(Copy, Clone, Default)] + pub struct Core; + + impl Core { + /// The `gitoxide.core.useNsec` key. + pub const USE_NSEC: keys::Boolean = keys::Boolean::new_boolean("useNsec", &Gitoxide::CORE) + .with_note("A runtime version of the USE_NSEC build flag."); + + /// The `gitoxide.core.useStdev` key. + pub const USE_STDEV: keys::Boolean = keys::Boolean::new_boolean("useStdev", &Gitoxide::CORE) + .with_note("A runtime version of the USE_STDEV build flag."); + + /// The `gitoxide.core.shallowFile` key. + pub const SHALLOW_FILE: keys::Path = keys::Path::new_path("shallowFile", &Gitoxide::CORE) + .with_environment_override("GIT_SHALLOW_FILE") + .with_deviation( + "relative file paths will always be made relative to the git-common-dir, whereas `git` keeps them as is.", + ); + } + + impl Section for Core { + fn name(&self) -> &str { + "core" + } + + fn keys(&self) -> &[&dyn Key] { + &[&Self::USE_NSEC, &Self::USE_STDEV, &Self::SHALLOW_FILE] + } + + fn parent(&self) -> Option<&dyn Section> { + Some(&Tree::GITOXIDE) + } + } + /// The `Http` sub-section. #[derive(Copy, Clone, Default)] pub struct Http; @@ -341,6 +382,7 @@ mod subsections { } } } +pub use subsections::{Allow, Author, Commit, Committer, Core, Http, Https, Objects, Ssh, User}; pub mod validate { use std::error::Error; @@ -357,7 +399,3 @@ pub mod validate { } } } - -pub use subsections::{Allow, Author, Commit, Committer, Http, Https, Objects, Ssh, User}; - -use crate::config; diff --git a/vendor/gix/src/config/tree/sections/index.rs b/vendor/gix/src/config/tree/sections/index.rs new file mode 100644 index 000000000..d03322247 --- /dev/null +++ b/vendor/gix/src/config/tree/sections/index.rs @@ -0,0 +1,62 @@ +use crate::{ + config, + config::tree::{keys, Index, Key, Section}, +}; + +impl Index { + /// The `index.threads` key. + pub const THREADS: IndexThreads = + IndexThreads::new_with_validate("threads", &config::Tree::INDEX, validate::IndexThreads); +} + +/// The `index.threads` key. +pub type IndexThreads = keys::Any<validate::IndexThreads>; + +mod index_threads { + use crate::bstr::BStr; + use crate::config; + use crate::config::key::GenericErrorWithValue; + use crate::config::tree::index::IndexThreads; + use std::borrow::Cow; + + impl IndexThreads { + /// Parse `value` into the amount of threads to use, with `1` being single-threaded, or `0` indicating + /// to select the amount of threads, with any other number being the specific amount of threads to use. + pub fn try_into_index_threads( + &'static self, + value: Cow<'_, BStr>, + ) -> Result<usize, config::key::GenericErrorWithValue> { + gix_config::Integer::try_from(value.as_ref()) + .ok() + .and_then(|i| i.to_decimal().and_then(|i| i.try_into().ok())) + .or_else(|| { + gix_config::Boolean::try_from(value.as_ref()) + .ok() + .map(|b| if b.0 { 0 } else { 1 }) + }) + .ok_or_else(|| GenericErrorWithValue::from_value(self, value.into_owned())) + } + } +} + +impl Section for Index { + fn name(&self) -> &str { + "index" + } + + fn keys(&self) -> &[&dyn Key] { + &[&Self::THREADS] + } +} + +mod validate { + use crate::{bstr::BStr, config::tree::keys}; + + pub struct IndexThreads; + impl keys::Validate for IndexThreads { + fn validate(&self, value: &BStr) -> Result<(), Box<dyn std::error::Error + Send + Sync + 'static>> { + super::Index::THREADS.try_into_index_threads(value.into())?; + Ok(()) + } + } +} diff --git a/vendor/gix/src/config/tree/sections/mod.rs b/vendor/gix/src/config/tree/sections/mod.rs index fb9b50786..9f0a50c93 100644 --- a/vendor/gix/src/config/tree/sections/mod.rs +++ b/vendor/gix/src/config/tree/sections/mod.rs @@ -55,6 +55,11 @@ pub mod gitoxide; pub struct Http; pub mod http; +/// The `index` top-level section. +#[derive(Copy, Clone, Default)] +pub struct Index; +pub mod index; + /// The `init` top-level section. #[derive(Copy, Clone, Default)] pub struct Init; diff --git a/vendor/gix/src/create.rs b/vendor/gix/src/create.rs index 96d047e3b..878ec1164 100644 --- a/vendor/gix/src/create.rs +++ b/vendor/gix/src/create.rs @@ -117,7 +117,7 @@ pub struct Options { pub destination_must_be_empty: bool, /// If set, use these filesystem capabilities to populate the respective gix-config fields. /// If `None`, the directory will be probed. - pub fs_capabilities: Option<gix_worktree::fs::Capabilities>, + pub fs_capabilities: Option<gix_fs::Capabilities>, } /// Create a new `.git` repository of `kind` within the possibly non-existing `directory` @@ -208,7 +208,7 @@ pub fn into( { let mut config = gix_config::File::default(); { - let caps = fs_capabilities.unwrap_or_else(|| gix_worktree::fs::Capabilities::probe(&dot_git)); + let caps = fs_capabilities.unwrap_or_else(|| gix_fs::Capabilities::probe(&dot_git)); let mut core = config.new_section("core", None).expect("valid section name"); core.push(key("repositoryformatversion"), Some("0".into())); diff --git a/vendor/gix/src/diff.rs b/vendor/gix/src/diff.rs new file mode 100644 index 000000000..b10819293 --- /dev/null +++ b/vendor/gix/src/diff.rs @@ -0,0 +1,17 @@ +pub use gix_diff::*; + +/// +pub mod rename { + /// Determine how to do rename tracking. + #[derive(Debug, Copy, Clone, Eq, PartialEq)] + pub enum Tracking { + /// Do not track renames at all, the fastest option. + Disabled, + /// Track renames. + Renames, + /// Track renames and copies. + /// + /// This is the most expensive option. + RenamesAndCopies, + } +} diff --git a/vendor/gix/src/id.rs b/vendor/gix/src/id.rs index c57565fb5..72f424334 100644 --- a/vendor/gix/src/id.rs +++ b/vendor/gix/src/id.rs @@ -90,9 +90,6 @@ impl<'repo> Id<'repo> { impl<'repo> Id<'repo> { /// Obtain a platform for traversing ancestors of this commit. /// - /// Note that unless [`error_on_missing_commit()`][revision::Walk::error_on_missing_commit()] is enabled, which be default it is not, - /// one will always see an empty iteration even if this id is not a commit, instead of an error. - /// If this is undesirable, it's best to check for the correct object type before creating an iterator. pub fn ancestors(&self) -> revision::walk::Platform<'repo> { revision::walk::Platform::new(Some(self.inner), self.repo) } @@ -186,10 +183,11 @@ mod tests { #[test] fn size_of_oid() { - assert_eq!( - std::mem::size_of::<Id<'_>>(), - 32, - "size of oid shouldn't change without notice" + let actual = std::mem::size_of::<Id<'_>>(); + let ceiling = 32; + assert!( + actual <= ceiling, + "size of oid shouldn't change without notice: {actual} <= {ceiling}" ) } } diff --git a/vendor/gix/src/lib.rs b/vendor/gix/src/lib.rs index 257a613d7..eb5efcfdf 100644 --- a/vendor/gix/src/lib.rs +++ b/vendor/gix/src/lib.rs @@ -73,8 +73,10 @@ pub use gix_date as date; pub use gix_features as features; use gix_features::threading::OwnShared; pub use gix_features::{parallel, progress::Progress, threading}; +pub use gix_fs as fs; pub use gix_glob as glob; pub use gix_hash as hash; +pub use gix_ignore as ignore; #[doc(inline)] pub use gix_index as index; pub use gix_lock as lock; @@ -92,18 +94,17 @@ pub use gix_traverse as traverse; pub use gix_url as url; #[doc(inline)] pub use gix_url::Url; +pub use gix_utils as utils; pub use hash::{oid, ObjectId}; pub mod interrupt; -mod ext; /// -pub mod prelude { - pub use gix_features::parallel::reduce::Finalize; - pub use gix_odb::{Find, FindExt, Header, HeaderExt, Write}; +pub mod attributes; - pub use crate::ext::*; -} +mod ext; +/// +pub mod prelude; /// pub mod path; @@ -133,33 +134,21 @@ mod repository; pub mod tag; /// -pub mod progress { - #[cfg(feature = "progress-tree")] - pub use gix_features::progress::prodash::tree; - pub use gix_features::progress::*; -} +pub mod progress; /// -pub mod diff { - pub use gix_diff::*; - /// - pub mod rename { - /// Determine how to do rename tracking. - #[derive(Debug, Copy, Clone, Eq, PartialEq)] - pub enum Tracking { - /// Do not track renames at all, the fastest option. - Disabled, - /// Track renames. - Renames, - /// Track renames and copies. - /// - /// This is the most expensive option. - RenamesAndCopies, - } - } -} +pub mod diff; /// See [ThreadSafeRepository::discover()], but returns a [`Repository`] instead. +/// +/// # Note +/// +/// **The discovered repository might not be suitable for any operation that requires authentication with remotes** +/// as it doesn't see the relevant git configuration. +/// +/// To achieve that, one has to [enable `git_binary` configuration](https://github.com/Byron/gitoxide/blob/9723e1addf52cc336d59322de039ea0537cdca36/src/plumbing/main.rs#L86) +/// in the open-options and use [`ThreadSafeRepository::discover_opts()`] instead. Alternatively, it might be well-known +/// that the tool is going to run in a neatly configured environment without relying on bundled configuration. #[allow(clippy::result_large_err)] pub fn discover(directory: impl AsRef<std::path::Path>) -> Result<Repository, discover::Error> { ThreadSafeRepository::discover(directory).map(Into::into) @@ -238,23 +227,6 @@ pub fn open_opts(directory: impl Into<std::path::PathBuf>, options: open::Option } /// -pub mod permission { - /// - pub mod env_var { - /// - pub mod resource { - /// - pub type Error = gix_sec::permission::Error<std::path::PathBuf>; - } - } -} -/// -pub mod permissions { - pub use crate::repository::permissions::{Config, Environment}; -} -pub use repository::permissions::Permissions; - -/// pub mod create; /// @@ -278,33 +250,10 @@ pub mod remote; pub mod init; /// Not to be confused with 'status'. -pub mod state { - /// Tell what operation is currently in progress. - #[derive(Debug, PartialEq, Eq)] - pub enum InProgress { - /// A mailbox is being applied. - ApplyMailbox, - /// A rebase is happening while a mailbox is being applied. - // TODO: test - ApplyMailboxRebase, - /// A git bisect operation has not yet been concluded. - Bisect, - /// A cherry pick operation. - CherryPick, - /// A cherry pick with multiple commits pending. - CherryPickSequence, - /// A merge operation. - Merge, - /// A rebase operation. - Rebase, - /// An interactive rebase operation. - RebaseInteractive, - /// A revert operation. - Revert, - /// A revert operation with multiple commits pending. - RevertSequence, - } -} +pub mod state; + +/// +pub mod shallow; /// pub mod discover; diff --git a/vendor/gix/src/object/commit.rs b/vendor/gix/src/object/commit.rs index e28a12955..5a9dfd4f3 100644 --- a/vendor/gix/src/object/commit.rs +++ b/vendor/gix/src/object/commit.rs @@ -109,7 +109,7 @@ impl<'repo> Commit<'repo> { .map(move |id| id.attach(repo)) } - /// Parse the commit and return the the tree object it points to. + /// Parse the commit and return the tree object it points to. pub fn tree(&self) -> Result<Tree<'repo>, Error> { match self.tree_id()?.object()?.try_into_tree() { Ok(tree) => Ok(tree), @@ -117,7 +117,7 @@ impl<'repo> Commit<'repo> { } } - /// Parse the commit and return the the tree id it points to. + /// Parse the commit and return the tree id it points to. pub fn tree_id(&self) -> Result<crate::Id<'repo>, gix_object::decode::Error> { gix_object::CommitRefIter::from_bytes(&self.data) .tree_id() diff --git a/vendor/gix/src/object/mod.rs b/vendor/gix/src/object/mod.rs index 75d77d138..d0a37db6c 100644 --- a/vendor/gix/src/object/mod.rs +++ b/vendor/gix/src/object/mod.rs @@ -90,6 +90,14 @@ impl<'repo> Object<'repo> { } } + /// Transform this object into a tag, or panic if it is none. + pub fn into_tag(self) -> Tag<'repo> { + match self.try_into() { + Ok(tag) => tag, + Err(this) => panic!("Tried to use {} as commit, but was {}", this.id, this.kind), + } + } + /// Transform this object into a commit, or return it as part of the `Err` if it is no commit. pub fn try_into_commit(self) -> Result<Commit<'repo>, try_into::Error> { self.try_into().map_err(|this: Self| try_into::Error { @@ -157,7 +165,7 @@ impl<'repo> Object<'repo> { }) } - /// Obtain a an iterator over commit tokens like in [`to_commit_iter()`][Object::try_to_commit_ref_iter()]. + /// Obtain an iterator over commit tokens like in [`to_commit_iter()`][Object::try_to_commit_ref_iter()]. /// /// # Panic /// diff --git a/vendor/gix/src/object/tag.rs b/vendor/gix/src/object/tag.rs index ce9d7360a..77eaaa259 100644 --- a/vendor/gix/src/object/tag.rs +++ b/vendor/gix/src/object/tag.rs @@ -1,6 +1,17 @@ use crate::{ext::ObjectIdExt, Tag}; impl<'repo> Tag<'repo> { + /// Decode the entire tag object and return it for accessing all tag information. + /// + /// This never allocates. + /// + /// Note that the returned commit object does make lookup easy and should be + /// used for successive calls to string-ish information to avoid decoding the object + /// more than once. + pub fn decode(&self) -> Result<gix_object::TagRef<'_>, gix_object::decode::Error> { + gix_object::TagRef::from_bytes(&self.data) + } + /// Decode this tag partially and return the id of its target. pub fn target_id(&self) -> Result<crate::Id<'repo>, gix_object::decode::Error> { gix_object::TagRefIter::from_bytes(&self.data) diff --git a/vendor/gix/src/object/tree/diff/mod.rs b/vendor/gix/src/object/tree/diff/mod.rs index 5a3bf6ddf..447eeaa84 100644 --- a/vendor/gix/src/object/tree/diff/mod.rs +++ b/vendor/gix/src/object/tree/diff/mod.rs @@ -3,20 +3,15 @@ use gix_diff::tree::recorder::Location; use crate::{bstr::BStr, Tree}; /// Returned by the `for_each` function to control flow. -#[derive(Clone, Copy, PartialOrd, PartialEq, Ord, Eq, Hash)] +#[derive(Default, Clone, Copy, PartialOrd, PartialEq, Ord, Eq, Hash)] pub enum Action { /// Continue the traversal of changes. + #[default] Continue, /// Stop the traversal of changes and stop calling this function. Cancel, } -impl Default for Action { - fn default() -> Self { - Action::Continue - } -} - /// Represents any possible change in order to turn one tree into another. #[derive(Debug, Clone, Copy)] pub struct Change<'a, 'old, 'new> { diff --git a/vendor/gix/src/object/tree/mod.rs b/vendor/gix/src/object/tree/mod.rs index db094bcb9..bbd392289 100644 --- a/vendor/gix/src/object/tree/mod.rs +++ b/vendor/gix/src/object/tree/mod.rs @@ -22,6 +22,11 @@ impl<'repo> Tree<'repo> { Id::from_id(self.id, self.repo) } + /// Parse our tree data and return the parse tree for direct access to its entries. + pub fn decode(&self) -> Result<gix_object::TreeRef<'_>, gix_object::decode::Error> { + gix_object::TreeRef::from_bytes(&self.data) + } + // TODO: tests. /// Follow a sequence of `path` components starting from this instance, and look them up one by one until the last component /// is looked up and its tree entry is returned. @@ -156,3 +161,15 @@ mod entry { } } } + +mod _impls { + use crate::Tree; + + impl TryFrom<Tree<'_>> for gix_object::Tree { + type Error = gix_object::decode::Error; + + fn try_from(t: Tree<'_>) -> Result<Self, Self::Error> { + t.decode().map(Into::into) + } + } +} diff --git a/vendor/gix/src/open/mod.rs b/vendor/gix/src/open/mod.rs index 77018f5a2..03c976204 100644 --- a/vendor/gix/src/open/mod.rs +++ b/vendor/gix/src/open/mod.rs @@ -1,6 +1,17 @@ use std::path::PathBuf; -use crate::{bstr::BString, config, permission, Permissions}; +use crate::{bstr::BString, config}; + +/// Permissions associated with various resources of a git repository +#[derive(Debug, Clone)] +pub struct Permissions { + /// Control which environment variables may be accessed. + pub env: permissions::Environment, + /// Permissions related where git configuration should be loaded from. + pub config: permissions::Config, + /// Permissions related to where `gitattributes` should be loaded from. + pub attributes: permissions::Attributes, +} /// The options used in [`ThreadSafeRepository::open_opts()`][crate::ThreadSafeRepository::open_opts()]. /// @@ -16,7 +27,7 @@ pub struct Options { /// Define what is allowed while opening a repository. pub permissions: Permissions, pub(crate) git_dir_trust: Option<gix_sec::Trust>, - /// Warning: this one is copied to to config::Cache - don't change it after repo open or keep in sync. + /// Warning: this one is copied to config::Cache - don't change it after repo open or keep in sync. pub(crate) filter_config_section: Option<fn(&gix_config::file::Metadata) -> bool>, pub(crate) lossy_config: Option<bool>, pub(crate) lenient_config: bool, @@ -44,11 +55,11 @@ pub enum Error { #[error("The git directory at '{}' is considered unsafe as it's not owned by the current user.", .path.display())] UnsafeGitDir { path: PathBuf }, #[error(transparent)] - EnvironmentAccessDenied(#[from] permission::env_var::resource::Error), + EnvironmentAccessDenied(#[from] gix_sec::permission::Error<std::path::PathBuf>), } mod options; - +pub mod permissions; mod repository; #[cfg(test)] diff --git a/vendor/gix/src/open/options.rs b/vendor/gix/src/open/options.rs index fb648e3c2..b098d55c1 100644 --- a/vendor/gix/src/open/options.rs +++ b/vendor/gix/src/open/options.rs @@ -1,7 +1,7 @@ use std::path::PathBuf; use super::{Error, Options}; -use crate::{bstr::BString, config, Permissions, ThreadSafeRepository}; +use crate::{bstr::BString, config, open::Permissions, ThreadSafeRepository}; impl Default for Options { fn default() -> Self { @@ -134,6 +134,9 @@ impl Options { /// /// This is recommended for all applications that prefer correctness over usability. /// `git` itself defaults to strict configuration mode, flagging incorrect configuration immediately. + /// + /// Failure to read configuration files due to IO errors will also be a hard error if this mode is enabled, otherwise + /// these errors will merely be logged. pub fn strict_config(mut self, toggle: bool) -> Self { self.lenient_config = !toggle; self diff --git a/vendor/gix/src/open/permissions.rs b/vendor/gix/src/open/permissions.rs new file mode 100644 index 000000000..633575a9d --- /dev/null +++ b/vendor/gix/src/open/permissions.rs @@ -0,0 +1,215 @@ +//! Various permissions to define what can be done when operating a [`Repository`][crate::Repository]. +use crate::open::Permissions; +use gix_sec::Trust; + +/// Configure from which sources git configuration may be loaded. +/// +/// Note that configuration from inside of the repository is always loaded as it's definitely required for correctness. +#[derive(Copy, Clone, Ord, PartialOrd, PartialEq, Eq, Debug, Hash)] +pub struct Config { + /// The git binary may come with configuration as part of its configuration, and if this is true (default false) + /// we will load the configuration of the git binary, if present and not a duplicate of the ones below. + /// + /// It's disabled by default as it may involve executing the git binary once per execution of the application. + pub git_binary: bool, + /// Whether to use the system configuration. + /// This is defined as `$(prefix)/etc/gitconfig` on unix. + pub system: bool, + /// Whether to use the git application configuration. + /// + /// A platform defined location for where a user's git application configuration should be located. + /// If `$XDG_CONFIG_HOME` is not set or empty, `$HOME/.config/git/config` will be used + /// on unix. + pub git: bool, + /// Whether to use the user configuration. + /// This is usually `~/.gitconfig` on unix. + pub user: bool, + /// Whether to use the configuration from environment variables. + pub env: bool, + /// Whether to follow include files are encountered in loaded configuration, + /// via `include` and `includeIf` sections. + pub includes: bool, +} + +impl Config { + /// Allow everything which usually relates to a fully trusted environment + pub fn all() -> Self { + Config { + git_binary: false, + system: true, + git: true, + user: true, + env: true, + includes: true, + } + } + + /// Load only configuration local to the git repository. + pub fn isolated() -> Self { + Config { + git_binary: false, + system: false, + git: false, + user: false, + env: false, + includes: false, + } + } +} + +impl Default for Config { + fn default() -> Self { + Self::all() + } +} + +/// Configure from which `gitattribute` files may be loaded. +/// +/// Note that `.gitattribute` files from within the repository are always loaded. +#[derive(Copy, Clone, Ord, PartialOrd, PartialEq, Eq, Debug, Hash)] +pub struct Attributes { + /// The git binary may come with attribute configuration in its installation directory, and if this is true (default false) + /// we will load the configuration of the git binary. + /// + /// It's disabled by default as it involves executing the git binary once per execution of the application. + pub git_binary: bool, + /// Whether to use the system configuration. + /// This is typically defined as `$(prefix)/etc/gitconfig`. + pub system: bool, + /// Whether to use the git application configuration. + /// + /// A platform defined location for where a user's git application configuration should be located. + /// If `$XDG_CONFIG_HOME` is not set or empty, `$HOME/.config/git/attributes` will be used + /// on unix. + pub git: bool, +} + +impl Attributes { + /// Allow everything which usually relates to a fully trusted environment + pub fn all() -> Self { + Attributes { + git_binary: false, + system: true, + git: true, + } + } + + /// Allow loading attributes that are local to the git repository. + pub fn isolated() -> Self { + Attributes { + git_binary: false, + system: false, + git: false, + } + } +} + +impl Default for Attributes { + fn default() -> Self { + Self::all() + } +} + +/// Permissions related to the usage of environment variables +#[derive(Debug, Clone, Copy)] +pub struct Environment { + /// Control whether resources pointed to by `XDG_CONFIG_HOME` can be used when looking up common configuration values. + /// + /// Note that [`gix_sec::Permission::Forbid`] will cause the operation to abort if a resource is set via the XDG config environment. + pub xdg_config_home: gix_sec::Permission, + /// Control the way resources pointed to by the home directory (similar to `xdg_config_home`) may be used. + pub home: gix_sec::Permission, + /// Control if environment variables to configure the HTTP transport, like `http_proxy` may be used. + /// + /// Note that http-transport related environment variables prefixed with `GIT_` may also be included here + /// if they match this category like `GIT_HTTP_USER_AGENT`. + pub http_transport: gix_sec::Permission, + /// Control if the `EMAIL` environment variables may be read. + /// + /// Note that identity related environment variables prefixed with `GIT_` may also be included here + /// if they match this category. + pub identity: gix_sec::Permission, + /// Control if environment variables related to the object database are handled. This includes features and performance + /// options alike. + pub objects: gix_sec::Permission, + /// Control if resources pointed to by `GIT_*` prefixed environment variables can be used, **but only** if they + /// are not contained in any other category. This is a catch-all section. + pub git_prefix: gix_sec::Permission, + /// Control if resources pointed to by `SSH_*` prefixed environment variables can be used (like `SSH_ASKPASS`) + pub ssh_prefix: gix_sec::Permission, +} + +impl Environment { + /// Allow access to the entire environment. + pub fn all() -> Self { + let allow = gix_sec::Permission::Allow; + Environment { + xdg_config_home: allow, + home: allow, + git_prefix: allow, + ssh_prefix: allow, + http_transport: allow, + identity: allow, + objects: allow, + } + } + + /// Don't allow loading any environment variables. + pub fn isolated() -> Self { + let deny = gix_sec::Permission::Deny; + Environment { + xdg_config_home: deny, + home: deny, + ssh_prefix: deny, + git_prefix: deny, + http_transport: deny, + identity: deny, + objects: deny, + } + } +} + +impl Permissions { + /// Secure permissions are similar to `all()` + pub fn secure() -> Self { + Permissions { + env: Environment::all(), + config: Config::all(), + attributes: Attributes::all(), + } + } + + /// Everything is allowed with this set of permissions, thus we read all configuration and do what git typically + /// does with owned repositories. + pub fn all() -> Self { + Permissions { + env: Environment::all(), + config: Config::all(), + attributes: Attributes::all(), + } + } + + /// Don't read any but the local git configuration and deny reading any environment variables. + pub fn isolated() -> Self { + Permissions { + config: Config::isolated(), + attributes: Attributes::isolated(), + env: Environment::isolated(), + } + } +} + +impl gix_sec::trust::DefaultForLevel for Permissions { + fn default_for_level(level: Trust) -> Self { + match level { + Trust::Full => Permissions::all(), + Trust::Reduced => Permissions::secure(), + } + } +} + +impl Default for Permissions { + fn default() -> Self { + Permissions::secure() + } +} diff --git a/vendor/gix/src/open/repository.rs b/vendor/gix/src/open/repository.rs index 85dd91da7..c7702b5f6 100644 --- a/vendor/gix/src/open/repository.rs +++ b/vendor/gix/src/open/repository.rs @@ -10,7 +10,8 @@ use crate::{ cache::{interpolate_context, util::ApplyLeniency}, tree::{gitoxide, Core, Key, Safe}, }, - permission, Permissions, ThreadSafeRepository, + open::Permissions, + ThreadSafeRepository, }; #[derive(Default, Clone)] @@ -26,7 +27,7 @@ pub(crate) struct EnvironmentOverrides { } impl EnvironmentOverrides { - fn from_env() -> Result<Self, permission::env_var::resource::Error> { + fn from_env() -> Result<Self, gix_sec::permission::Error<std::path::PathBuf>> { let mut worktree_dir = None; if let Some(path) = std::env::var_os(Core::WORKTREE.the_environment_override()) { worktree_dir = PathBuf::from(path).into(); @@ -146,13 +147,18 @@ impl ThreadSafeRepository { lenient_config, bail_if_untrusted, open_path_as_is: _, - permissions: Permissions { ref env, config }, + permissions: + Permissions { + ref env, + config, + attributes, + }, ref api_config_overrides, ref cli_config_overrides, ref current_dir, } = options; let current_dir = current_dir.as_deref().expect("BUG: current_dir must be set by caller"); - let git_dir_trust = git_dir_trust.expect("trust must be been determined by now"); + let git_dir_trust = git_dir_trust.expect("trust must be determined by now"); // TODO: assure we handle the worktree-dir properly as we can have config per worktree with an extension. // This would be something read in later as have to first check for extensions. Also this means @@ -180,9 +186,7 @@ impl ThreadSafeRepository { }; let head = refs.find("HEAD").ok(); let git_install_dir = crate::path::install_dir().ok(); - let home = std::env::var_os("HOME") - .map(PathBuf::from) - .and_then(|home| env.home.check_opt(home)); + let home = gix_path::env::home_dir().and_then(|home| env.home.check_opt(home)); let mut filter_config_section = filter_config_section.unwrap_or(config::section::is_trusted); let config = config::Cache::from_stage_one( @@ -192,7 +196,8 @@ impl ThreadSafeRepository { filter_config_section, git_install_dir.as_deref(), home.as_deref(), - env.clone(), + *env, + attributes, config, lenient_config, api_config_overrides, @@ -266,7 +271,8 @@ impl ThreadSafeRepository { config, // used when spawning new repositories off this one when following worktrees linked_worktree_options: options, - index: gix_features::fs::MutableSnapshot::new().into(), + index: gix_fs::SharedFileSnapshotMut::new().into(), + shallow_commits: gix_fs::SharedFileSnapshotMut::new().into(), }) } } diff --git a/vendor/gix/src/prelude.rs b/vendor/gix/src/prelude.rs new file mode 100644 index 000000000..36fbfc7b1 --- /dev/null +++ b/vendor/gix/src/prelude.rs @@ -0,0 +1,4 @@ +pub use gix_features::parallel::reduce::Finalize; +pub use gix_odb::{Find, FindExt, Header, HeaderExt, Write}; + +pub use crate::ext::*; diff --git a/vendor/gix/src/progress.rs b/vendor/gix/src/progress.rs new file mode 100644 index 000000000..0a88aa044 --- /dev/null +++ b/vendor/gix/src/progress.rs @@ -0,0 +1,3 @@ +#[cfg(feature = "progress-tree")] +pub use gix_features::progress::prodash::tree; +pub use gix_features::progress::*; diff --git a/vendor/gix/src/remote/connect.rs b/vendor/gix/src/remote/connect.rs index 8e656975e..3dbd93486 100644 --- a/vendor/gix/src/remote/connect.rs +++ b/vendor/gix/src/remote/connect.rs @@ -1,7 +1,7 @@ #![allow(clippy::result_large_err)] use gix_protocol::transport::client::Transport; -use crate::{remote::Connection, Progress, Remote}; +use crate::{remote::Connection, Remote}; mod error { use crate::{bstr::BString, config, remote}; @@ -51,17 +51,15 @@ impl<'repo> Remote<'repo> { /// /// Note that this method expects the `transport` to be created by the user, which would involve the [`url()`][Self::url()]. /// It's meant to be used when async operation is needed with runtimes of the user's choice. - pub fn to_connection_with_transport<T, P>(&self, transport: T, progress: P) -> Connection<'_, 'repo, T, P> + pub fn to_connection_with_transport<T>(&self, transport: T) -> Connection<'_, 'repo, T> where T: Transport, - P: Progress, { Connection { remote: self, authenticate: None, transport_options: None, transport, - progress, } } @@ -75,14 +73,10 @@ impl<'repo> Remote<'repo> { /// [to_connection_with_transport()][Self::to_connection_with_transport()]. #[cfg(any(feature = "blocking-network-client", feature = "async-network-client-async-std"))] #[gix_protocol::maybe_async::maybe_async] - pub async fn connect<P>( + pub async fn connect( &self, direction: crate::remote::Direction, - progress: P, - ) -> Result<Connection<'_, 'repo, Box<dyn Transport + Send>, P>, Error> - where - P: Progress, - { + ) -> Result<Connection<'_, 'repo, Box<dyn Transport + Send>>, Error> { let (url, version) = self.sanitized_url_and_version(direction)?; #[cfg(feature = "blocking-network-client")] let scheme_is_ssh = url.scheme == gix_url::Scheme::Ssh; @@ -98,7 +92,7 @@ impl<'repo> Remote<'repo> { }, ) .await?; - Ok(self.to_connection_with_transport(transport, progress)) + Ok(self.to_connection_with_transport(transport)) } /// Produce the sanitized URL and protocol version to use as obtained by querying the repository configuration. diff --git a/vendor/gix/src/remote/connection/access.rs b/vendor/gix/src/remote/connection/access.rs index e4c31c3f5..eba603da0 100644 --- a/vendor/gix/src/remote/connection/access.rs +++ b/vendor/gix/src/remote/connection/access.rs @@ -4,7 +4,7 @@ use crate::{ }; /// Builder -impl<'a, 'repo, T, P> Connection<'a, 'repo, T, P> { +impl<'a, 'repo, T> Connection<'a, 'repo, T> { /// Set a custom credentials callback to provide credentials if the remotes require authentication. /// /// Otherwise we will use the git configuration to perform the same task as the `git credential` helper program, @@ -37,8 +37,26 @@ impl<'a, 'repo, T, P> Connection<'a, 'repo, T, P> { } } +/// Mutation +impl<'a, 'repo, T> Connection<'a, 'repo, T> { + /// Like [`with_credentials()`][Self::with_credentials()], but without consuming the connection. + pub fn set_credentials( + &mut self, + helper: impl FnMut(gix_credentials::helper::Action) -> gix_credentials::protocol::Result + 'a, + ) -> &mut Self { + self.authenticate = Some(Box::new(helper)); + self + } + + /// Like [`with_transport_options()`][Self::with_transport_options()], but without consuming the connection. + pub fn set_transport_options(&mut self, config: Box<dyn std::any::Any>) -> &mut Self { + self.transport_options = Some(config); + self + } +} + /// Access -impl<'a, 'repo, T, P> Connection<'a, 'repo, T, P> { +impl<'a, 'repo, T> Connection<'a, 'repo, T> { /// A utility to return a function that will use this repository's configuration to obtain credentials, similar to /// what `git credential` is doing. /// diff --git a/vendor/gix/src/remote/connection/fetch/error.rs b/vendor/gix/src/remote/connection/fetch/error.rs index 0e6a4b840..afcacca13 100644 --- a/vendor/gix/src/remote/connection/fetch/error.rs +++ b/vendor/gix/src/remote/connection/fetch/error.rs @@ -28,6 +28,21 @@ pub enum Error { path: std::path::PathBuf, source: std::io::Error, }, + #[error(transparent)] + ShallowOpen(#[from] crate::shallow::open::Error), + #[error("Server lack feature {feature:?}: {description}")] + MissingServerFeature { + feature: &'static str, + description: &'static str, + }, + #[error("Could not write 'shallow' file to incorporate remote updates after fetching")] + WriteShallowFile(#[from] crate::shallow::write::Error), + #[error("'shallow' file could not be locked in preparation for writing changes")] + LockShallowFile(#[from] gix_lock::acquire::Error), + #[error("Could not obtain configuration to learn if shallow remotes should be rejected")] + RejectShallowRemoteConfig(#[from] config::boolean::Error), + #[error("Receiving objects from shallow remotes is prohibited due to the value of `clone.rejectShallow`")] + RejectShallowRemote, } impl gix_protocol::transport::IsSpuriousError for Error { diff --git a/vendor/gix/src/remote/connection/fetch/mod.rs b/vendor/gix/src/remote/connection/fetch/mod.rs index 4ce631b1e..a51ae7c54 100644 --- a/vendor/gix/src/remote/connection/fetch/mod.rs +++ b/vendor/gix/src/remote/connection/fetch/mod.rs @@ -116,10 +116,9 @@ pub mod prepare { } } -impl<'remote, 'repo, T, P> Connection<'remote, 'repo, T, P> +impl<'remote, 'repo, T> Connection<'remote, 'repo, T> where T: Transport, - P: Progress, { /// Perform a handshake with the remote and obtain a ref-map with `options`, and from there one /// Note that at this point, the `transport` should already be configured using the [`transport_mut()`][Self::transport_mut()] @@ -137,23 +136,25 @@ where #[gix_protocol::maybe_async::maybe_async] pub async fn prepare_fetch( mut self, + progress: impl Progress, options: ref_map::Options, - ) -> Result<Prepare<'remote, 'repo, T, P>, prepare::Error> { + ) -> Result<Prepare<'remote, 'repo, T>, prepare::Error> { if self.remote.refspecs(remote::Direction::Fetch).is_empty() { return Err(prepare::Error::MissingRefSpecs); } - let ref_map = self.ref_map_inner(options).await?; + let ref_map = self.ref_map_inner(progress, options).await?; Ok(Prepare { con: Some(self), ref_map, dry_run: DryRun::No, reflog_message: None, write_packed_refs: WritePackedRefs::Never, + shallow: Default::default(), }) } } -impl<'remote, 'repo, T, P> Prepare<'remote, 'repo, T, P> +impl<'remote, 'repo, T> Prepare<'remote, 'repo, T> where T: Transport, { @@ -170,19 +171,20 @@ mod receive_pack; pub mod refs; /// A structure to hold the result of the handshake with the remote and configure the upcoming fetch operation. -pub struct Prepare<'remote, 'repo, T, P> +pub struct Prepare<'remote, 'repo, T> where T: Transport, { - con: Option<Connection<'remote, 'repo, T, P>>, + con: Option<Connection<'remote, 'repo, T>>, ref_map: RefMap, dry_run: DryRun, reflog_message: Option<RefLogMessage>, write_packed_refs: WritePackedRefs, + shallow: remote::fetch::Shallow, } /// Builder -impl<'remote, 'repo, T, P> Prepare<'remote, 'repo, T, P> +impl<'remote, 'repo, T> Prepare<'remote, 'repo, T> where T: Transport, { @@ -212,9 +214,17 @@ where self.reflog_message = reflog_message.into(); self } + + /// Define what to do when the current repository is a shallow clone. + /// + /// *Has no effect if the current repository is not as shallow clone.* + pub fn with_shallow(mut self, shallow: remote::fetch::Shallow) -> Self { + self.shallow = shallow; + self + } } -impl<'remote, 'repo, T, P> Drop for Prepare<'remote, 'repo, T, P> +impl<'remote, 'repo, T> Drop for Prepare<'remote, 'repo, T> where T: Transport, { diff --git a/vendor/gix/src/remote/connection/fetch/negotiate.rs b/vendor/gix/src/remote/connection/fetch/negotiate.rs index f5051ec72..771c5acba 100644 --- a/vendor/gix/src/remote/connection/fetch/negotiate.rs +++ b/vendor/gix/src/remote/connection/fetch/negotiate.rs @@ -1,3 +1,5 @@ +use crate::remote::fetch; + /// The way the negotiation is performed #[derive(Copy, Clone)] pub(crate) enum Algorithm { @@ -16,6 +18,7 @@ pub enum Error { /// Negotiate one round with `algo` by looking at `ref_map` and adjust `arguments` to contain the haves and wants. /// If this is not the first round, the `previous_response` is set with the last recorded server response. /// Returns `true` if the negotiation is done from our side so the server won't keep asking. +#[allow(clippy::too_many_arguments)] pub(crate) fn one_round( algo: Algorithm, round: usize, @@ -24,13 +27,20 @@ pub(crate) fn one_round( fetch_tags: crate::remote::fetch::Tags, arguments: &mut gix_protocol::fetch::Arguments, _previous_response: Option<&gix_protocol::fetch::Response>, + shallow: Option<&fetch::Shallow>, ) -> Result<bool, Error> { let tag_refspec_to_ignore = fetch_tags .to_refspec() .filter(|_| matches!(fetch_tags, crate::remote::fetch::Tags::Included)); + if let Some(fetch::Shallow::Deepen(0)) = shallow { + // Avoid deepening (relative) with zero as it seems to upset the server. Git also doesn't actually + // perform the negotiation for some reason (couldn't find it in code). + return Ok(true); + } + match algo { Algorithm::Naive => { - assert_eq!(round, 1, "Naive always finishes after the first round, and claims."); + assert_eq!(round, 1, "Naive always finishes after the first round, it claims."); let mut has_missing_tracking_branch = false; for mapping in &ref_map.mappings { if tag_refspec_to_ignore.map_or(false, |tag_spec| { @@ -65,10 +75,11 @@ pub(crate) fn one_round( } } - if has_missing_tracking_branch { + if has_missing_tracking_branch || (shallow.is_some() && arguments.is_empty()) { if let Ok(Some(r)) = repo.head_ref() { if let Some(id) = r.target().try_id() { arguments.have(id); + arguments.want(id); } } } diff --git a/vendor/gix/src/remote/connection/fetch/receive_pack.rs b/vendor/gix/src/remote/connection/fetch/receive_pack.rs index 686de5999..99560fbca 100644 --- a/vendor/gix/src/remote/connection/fetch/receive_pack.rs +++ b/vendor/gix/src/remote/connection/fetch/receive_pack.rs @@ -1,23 +1,25 @@ -use std::sync::atomic::AtomicBool; +use std::sync::atomic::{AtomicBool, Ordering}; use gix_odb::FindExt; -use gix_protocol::transport::client::Transport; +use gix_protocol::{ + fetch::Arguments, + transport::{client::Transport, packetline::read::ProgressAction}, +}; use crate::{ + config::tree::Clone, remote, remote::{ connection::fetch::config, fetch, - fetch::{negotiate, refs, Error, Outcome, Prepare, ProgressId, RefLogMessage, Status}, + fetch::{negotiate, refs, Error, Outcome, Prepare, ProgressId, RefLogMessage, Shallow, Status}, }, - Progress, + Progress, Repository, }; -impl<'remote, 'repo, T, P> Prepare<'remote, 'repo, T, P> +impl<'remote, 'repo, T> Prepare<'remote, 'repo, T> where T: Transport, - P: Progress, - P::SubProgress: 'static, { /// Receive the pack and perform the operation as configured by git via `gix-config` or overridden by various builder methods. /// Return `Ok(None)` if there was nothing to do because all remote refs are at the same state as they are locally, or `Ok(Some(outcome))` @@ -62,14 +64,18 @@ where /// - `gitoxide.userAgent` is read to obtain the application user agent for git servers and for HTTP servers as well. /// #[gix_protocol::maybe_async::maybe_async] - pub async fn receive(mut self, should_interrupt: &AtomicBool) -> Result<Outcome, Error> { + pub async fn receive<P>(mut self, mut progress: P, should_interrupt: &AtomicBool) -> Result<Outcome, Error> + where + P: Progress, + P::SubProgress: 'static, + { let mut con = self.con.take().expect("receive() can only be called once"); let handshake = &self.ref_map.handshake; let protocol_version = handshake.server_protocol_version; let fetch = gix_protocol::Command::Fetch; - let progress = &mut con.progress; + let progress = &mut progress; let repo = con.remote.repo; let fetch_features = { let mut f = fetch.default_features(protocol_version, &handshake.capabilities); @@ -82,10 +88,17 @@ where let mut arguments = gix_protocol::fetch::Arguments::new(protocol_version, fetch_features); if matches!(con.remote.fetch_tags, crate::remote::fetch::Tags::Included) { if !arguments.can_use_include_tag() { - unimplemented!("we expect servers to support 'include-tag', otherwise we have to implement another pass to fetch attached tags separately"); + return Err(Error::MissingServerFeature { + feature: "include-tag", + description: + // NOTE: if this is an issue, we could probably do what's proposed here. + "To make this work we would have to implement another pass to fetch attached tags separately", + }); } arguments.use_include_tag(); } + let (shallow_commits, mut shallow_lock) = add_shallow_args(&mut arguments, &self.shallow, repo)?; + let mut previous_response = None::<gix_protocol::fetch::Response>; let mut round = 1; @@ -108,6 +121,7 @@ where con.remote.fetch_tags, &mut arguments, previous_response.as_ref(), + (self.shallow != Shallow::NoChange).then_some(&self.shallow), ) { Ok(_) if arguments.is_empty() => { gix_protocol::indicate_end_of_interaction(&mut con.transport).await.ok(); @@ -137,20 +151,35 @@ where round += 1; let mut reader = arguments.send(&mut con.transport, is_done).await?; if sideband_all { - setup_remote_progress(progress, &mut reader); + setup_remote_progress(progress, &mut reader, should_interrupt); } let response = gix_protocol::fetch::Response::from_line_reader(protocol_version, &mut reader).await?; if response.has_pack() { progress.step(); progress.set_name("receiving pack"); if !sideband_all { - setup_remote_progress(progress, &mut reader); + setup_remote_progress(progress, &mut reader, should_interrupt); } + previous_response = Some(response); break 'negotiation reader; } else { previous_response = Some(response); } }; + let previous_response = previous_response.expect("knowledge of a pack means a response was received"); + if !previous_response.shallow_updates().is_empty() && shallow_lock.is_none() { + let reject_shallow_remote = repo + .config + .resolved + .boolean_filter_by_key("clone.rejectShallow", &mut repo.filter_config_section()) + .map(|val| Clone::REJECT_SHALLOW.enrich_error(val)) + .transpose()? + .unwrap_or(false); + if reject_shallow_remote { + return Err(Error::RejectShallowRemote); + } + shallow_lock = acquire_shallow_lock(repo).map(Some)?; + } let options = gix_pack::bundle::write::Options { thread_limit: config::index_threads(repo)?, @@ -170,7 +199,7 @@ where reader }, Some(repo.objects.store_ref().path().join("pack")), - con.progress, + progress, should_interrupt, Some(Box::new({ let repo = repo.clone(); @@ -187,6 +216,12 @@ where gix_protocol::indicate_end_of_interaction(&mut con.transport).await.ok(); } + if let Some(shallow_lock) = shallow_lock { + if !previous_response.shallow_updates().is_empty() { + crate::shallow::write(shallow_lock, shallow_commits, previous_response.shallow_updates())?; + } + } + let update_refs = refs::update( repo, self.reflog_message @@ -221,9 +256,61 @@ where } } +fn acquire_shallow_lock(repo: &Repository) -> Result<gix_lock::File, Error> { + gix_lock::File::acquire_to_update_resource(repo.shallow_file(), gix_lock::acquire::Fail::Immediately, None) + .map_err(Into::into) +} + +fn add_shallow_args( + args: &mut Arguments, + shallow: &Shallow, + repo: &Repository, +) -> Result<(Option<crate::shallow::Commits>, Option<gix_lock::File>), Error> { + let expect_change = *shallow != Shallow::NoChange; + let shallow_lock = expect_change.then(|| acquire_shallow_lock(repo)).transpose()?; + + let shallow_commits = repo.shallow_commits()?; + if (shallow_commits.is_some() || expect_change) && !args.can_use_shallow() { + // NOTE: if this is an issue, we can always unshallow the repo ourselves. + return Err(Error::MissingServerFeature { + feature: "shallow", + description: "shallow clones need server support to remain shallow, otherwise bigger than expected packs are sent effectively unshallowing the repository", + }); + } + if let Some(shallow_commits) = &shallow_commits { + for commit in shallow_commits.iter() { + args.shallow(commit); + } + } + match shallow { + Shallow::NoChange => {} + Shallow::DepthAtRemote(commits) => args.deepen(commits.get() as usize), + Shallow::Deepen(commits) => { + args.deepen(*commits as usize); + args.deepen_relative(); + } + Shallow::Since { cutoff } => { + args.deepen_since(cutoff.seconds_since_unix_epoch as usize); + } + Shallow::Exclude { + remote_refs, + since_cutoff, + } => { + if let Some(cutoff) = since_cutoff { + args.deepen_since(cutoff.seconds_since_unix_epoch as usize); + } + for ref_ in remote_refs { + args.deepen_not(ref_.as_ref().as_bstr()); + } + } + } + Ok((shallow_commits, shallow_lock)) +} + fn setup_remote_progress<P>( progress: &mut P, reader: &mut Box<dyn gix_protocol::transport::client::ExtendedBufRead + Unpin + '_>, + should_interrupt: &AtomicBool, ) where P: Progress, P::SubProgress: 'static, @@ -231,8 +318,23 @@ fn setup_remote_progress<P>( use gix_protocol::transport::client::ExtendedBufRead; reader.set_progress_handler(Some(Box::new({ let mut remote_progress = progress.add_child_with_id("remote", ProgressId::RemoteProgress.into()); + // SAFETY: Ugh, so, with current Rust I can't declare lifetimes in the involved traits the way they need to + // be and I also can't use scoped threads to pump from local scopes to an Arc version that could be + // used here due to the this being called from sync AND async code (and the async version doesn't work + // with a surrounding `std::thread::scope()`. + // Thus there is only claiming this is 'static which we know works for *our* implementations of ExtendedBufRead + // and typical implementations, but of course it's possible for user code to come along and actually move this + // handler into a context where it can outlive the current function. Is this going to happen? Probably not unless + // somebody really wants to break it. So, with standard usage this value is never used past its actual lifetime. + #[allow(unsafe_code)] + let should_interrupt: &'static AtomicBool = unsafe { std::mem::transmute(should_interrupt) }; move |is_err: bool, data: &[u8]| { - gix_protocol::RemoteProgress::translate_to_progress(is_err, data, &mut remote_progress) + gix_protocol::RemoteProgress::translate_to_progress(is_err, data, &mut remote_progress); + if should_interrupt.load(Ordering::Relaxed) { + ProgressAction::Interrupt + } else { + ProgressAction::Continue + } } }) as gix_protocol::transport::client::HandleProgress)); } diff --git a/vendor/gix/src/remote/connection/mod.rs b/vendor/gix/src/remote/connection/mod.rs index 09943ecc4..02a09926a 100644 --- a/vendor/gix/src/remote/connection/mod.rs +++ b/vendor/gix/src/remote/connection/mod.rs @@ -12,12 +12,11 @@ pub type AuthenticateFn<'a> = Box<dyn FnMut(gix_credentials::helper::Action) -> /// /// It can be used to perform a variety of operations with the remote without worrying about protocol details, /// much like a remote procedure call. -pub struct Connection<'a, 'repo, T, P> { +pub struct Connection<'a, 'repo, T> { pub(crate) remote: &'a Remote<'repo>, pub(crate) authenticate: Option<AuthenticateFn<'a>>, pub(crate) transport_options: Option<Box<dyn std::any::Any>>, pub(crate) transport: T, - pub(crate) progress: P, } mod access; diff --git a/vendor/gix/src/remote/connection/ref_map.rs b/vendor/gix/src/remote/connection/ref_map.rs index 0206e9002..abf9c8e00 100644 --- a/vendor/gix/src/remote/connection/ref_map.rs +++ b/vendor/gix/src/remote/connection/ref_map.rs @@ -71,10 +71,9 @@ impl Default for Options { } } -impl<'remote, 'repo, T, P> Connection<'remote, 'repo, T, P> +impl<'remote, 'repo, T> Connection<'remote, 'repo, T> where T: Transport, - P: Progress, { /// List all references on the remote that have been filtered through our remote's [`refspecs`][crate::Remote::refspecs()] /// for _fetching_. @@ -94,8 +93,8 @@ where /// - `gitoxide.userAgent` is read to obtain the application user agent for git servers and for HTTP servers as well. #[allow(clippy::result_large_err)] #[gix_protocol::maybe_async::maybe_async] - pub async fn ref_map(mut self, options: Options) -> Result<fetch::RefMap, Error> { - let res = self.ref_map_inner(options).await; + pub async fn ref_map(mut self, progress: impl Progress, options: Options) -> Result<fetch::RefMap, Error> { + let res = self.ref_map_inner(progress, options).await; gix_protocol::indicate_end_of_interaction(&mut self.transport) .await .ok(); @@ -106,6 +105,7 @@ where #[gix_protocol::maybe_async::maybe_async] pub(crate) async fn ref_map_inner( &mut self, + progress: impl Progress, Options { prefix_from_spec_as_filter_on_remote, handshake_parameters, @@ -125,7 +125,12 @@ where s }; let remote = self - .fetch_refs(prefix_from_spec_as_filter_on_remote, handshake_parameters, &specs) + .fetch_refs( + prefix_from_spec_as_filter_on_remote, + handshake_parameters, + &specs, + progress, + ) .await?; let num_explicit_specs = self.remote.fetch_specs.len(); let group = gix_refspec::MatchGroup::from_fetch_specs(specs.iter().map(|s| s.to_ref())); @@ -179,6 +184,7 @@ where filter_by_prefix: bool, extra_parameters: Vec<(String, Option<String>)>, refspecs: &[gix_refspec::RefSpec], + mut progress: impl Progress, ) -> Result<HandshakeWithRefs, Error> { let mut credentials_storage; let url = self.transport.to_url(); @@ -209,8 +215,7 @@ where self.transport.configure(&**config)?; } let mut outcome = - gix_protocol::fetch::handshake(&mut self.transport, authenticate, extra_parameters, &mut self.progress) - .await?; + gix_protocol::fetch::handshake(&mut self.transport, authenticate, extra_parameters, &mut progress).await?; let refs = match outcome.refs.take() { Some(refs) => refs, None => { @@ -236,7 +241,7 @@ where } Ok(gix_protocol::ls_refs::Action::Continue) }, - &mut self.progress, + &mut progress, ) .await? } diff --git a/vendor/gix/src/remote/fetch.rs b/vendor/gix/src/remote/fetch.rs index 4add96a65..0001447cb 100644 --- a/vendor/gix/src/remote/fetch.rs +++ b/vendor/gix/src/remote/fetch.rs @@ -19,24 +19,19 @@ pub(crate) enum WritePackedRefs { } /// Describe how to handle tags when fetching -#[derive(Debug, Copy, Clone, PartialEq, Eq)] +#[derive(Default, Debug, Copy, Clone, PartialEq, Eq)] pub enum Tags { /// Fetch all tags from the remote, even if these are not reachable from objects referred to by our refspecs. All, /// Fetch only the tags that point to the objects being sent. /// That way, annotated tags that point to an object we receive are automatically transmitted and their refs are created. /// The same goes for lightweight tags. + #[default] Included, /// Do not fetch any tags. None, } -impl Default for Tags { - fn default() -> Self { - Tags::Included - } -} - impl Tags { /// Obtain a refspec that determines whether or not to fetch all tags, depending on this variant. /// @@ -52,6 +47,47 @@ impl Tags { } } +/// Describe how shallow clones are handled when fetching, with variants defining how the *shallow boundary* is handled. +/// +/// The *shallow boundary* is a set of commits whose parents are not present in the repository. +#[derive(Default, Debug, Clone, PartialEq, Eq)] +pub enum Shallow { + /// Fetch all changes from the remote without affecting the shallow boundary at all. + #[default] + NoChange, + /// Receive update to `depth` commits in the history of the refs to fetch (from the viewpoint of the remote), + /// with the value of `1` meaning to receive only the commit a ref is pointing to. + /// + /// This may update the shallow boundary to increase or decrease the amount of available history. + DepthAtRemote(std::num::NonZeroU32), + /// Increase the number of commits and thus expand the shallow boundary by `depth` commits as seen from our local + /// shallow boundary, with a value of `0` having no effect. + Deepen(u32), + /// Set the shallow boundary at the `cutoff` time, meaning that there will be no commits beyond that time. + Since { + /// The date beyond which there will be no history. + cutoff: gix_date::Time, + }, + /// Receive all history excluding all commits reachable from `remote_refs`. These can be long or short + /// ref names or tag names. + Exclude { + /// The ref names to exclude, short or long. Note that ambiguous short names will cause the remote to abort + /// without an error message being transferred (because the protocol does not support it) + remote_refs: Vec<gix_ref::PartialName>, + /// If some, this field has the same meaning as [`Shallow::Since`] which can be used in combination + /// with excluded references. + since_cutoff: Option<gix_date::Time>, + }, +} + +impl Shallow { + /// Produce a variant that causes the repository to loose its shallow boundary, effectively by extending it + /// beyond all limits. + pub fn undo() -> Self { + Shallow::DepthAtRemote((i32::MAX as u32).try_into().expect("valid at compile time")) + } +} + /// Information about the relationship between our refspecs, and remote references with their local counterparts. #[derive(Default, Debug, Clone)] #[cfg(any(feature = "blocking-network-client", feature = "async-network-client"))] diff --git a/vendor/gix/src/remote/save.rs b/vendor/gix/src/remote/save.rs index 0e347551e..ad6a75b14 100644 --- a/vendor/gix/src/remote/save.rs +++ b/vendor/gix/src/remote/save.rs @@ -32,6 +32,7 @@ impl Remote<'_> { /// Note that all sections named `remote "<name>"` will be cleared of all values we are about to write, /// and the last `remote "<name>"` section will be containing all relevant values so that reloading the remote /// from `config` would yield the same in-memory state. + #[allow(clippy::result_large_err)] pub fn save_to(&self, config: &mut gix_config::File<'static>) -> Result<(), Error> { fn as_key(name: &str) -> gix_config::parse::section::Key<'_> { name.try_into().expect("valid") @@ -109,6 +110,7 @@ impl Remote<'_> { /// Note that this sets a name for anonymous remotes, but overwrites the name for those who were named before. /// If this name is different from the current one, the git configuration will still contain the previous name, /// and the caller should account for that. + #[allow(clippy::result_large_err)] pub fn save_as_to( &mut self, name: impl Into<BString>, diff --git a/vendor/gix/src/repository/attributes.rs b/vendor/gix/src/repository/attributes.rs new file mode 100644 index 000000000..252529761 --- /dev/null +++ b/vendor/gix/src/repository/attributes.rs @@ -0,0 +1,50 @@ +//! exclude information +use crate::Repository; + +impl Repository { + /// Configure a file-system cache for accessing git attributes *and* excludes on a per-path basis. + /// + /// Use `attribute_source` to specify where to read attributes from. Also note that exclude information will + /// always try to read `.gitignore` files from disk before trying to read it from the `index`. + /// + /// Note that no worktree is required for this to work, even though access to in-tree `.gitattributes` and `.gitignore` files + /// would require a non-empty `index` that represents a git tree. + /// + /// This takes into consideration all the usual repository configuration, namely: + /// + /// * `$XDG_CONFIG_HOME/…/ignore|attributes` if `core.excludesFile|attributesFile` is *not* set, otherwise use the configured file. + /// * `$GIT_DIR/info/exclude|attributes` if present. + // TODO: test, provide higher-level custom Cache wrapper that is much easier to use and doesn't panic when accessing entries + // by non-relative path. + pub fn attributes( + &self, + index: &gix_index::State, + attributes_source: gix_worktree::cache::state::attributes::Source, + ignore_source: gix_worktree::cache::state::ignore::Source, + exclude_overrides: Option<gix_ignore::Search>, + ) -> Result<gix_worktree::Cache, crate::attributes::Error> { + let case = if self.config.ignore_case { + gix_glob::pattern::Case::Fold + } else { + gix_glob::pattern::Case::Sensitive + }; + let (attributes, mut buf) = self.config.assemble_attribute_globals( + self.git_dir(), + attributes_source, + self.options.permissions.attributes, + )?; + let ignore = + self.config + .assemble_exclude_globals(self.git_dir(), exclude_overrides, ignore_source, &mut buf)?; + let state = gix_worktree::cache::State::AttributesAndIgnoreStack { attributes, ignore }; + let attribute_list = state.id_mappings_from_index(index, index.path_backing(), ignore_source, case); + Ok(gix_worktree::Cache::new( + // this is alright as we don't cause mutation of that directory, it's virtual. + self.work_dir().unwrap_or(self.git_dir()), + state, + case, + buf, + attribute_list, + )) + } +} diff --git a/vendor/gix/src/repository/excludes.rs b/vendor/gix/src/repository/excludes.rs new file mode 100644 index 000000000..6281549e0 --- /dev/null +++ b/vendor/gix/src/repository/excludes.rs @@ -0,0 +1,45 @@ +//! exclude information +use crate::{config, Repository}; +impl Repository { + /// Configure a file-system cache checking if files below the repository are excluded, reading `.gitignore` files from + /// the specified `source`. + /// + /// Note that no worktree is required for this to work, even though access to in-tree `.gitignore` files would require + /// a non-empty `index` that represents a tree with `.gitignore` files. + /// + /// This takes into consideration all the usual repository configuration, namely: + /// + /// * `$XDG_CONFIG_HOME/…/ignore` if `core.excludesFile` is *not* set, otherwise use the configured file. + /// * `$GIT_DIR/info/exclude` if present. + /// + /// When only excludes are desired, this is the most efficient way to obtain them. Otherwise use + /// [`Repository::attributes()`] for accessing both attributes and excludes. + // TODO: test, provide higher-level custom Cache wrapper that is much easier to use and doesn't panic when accessing entries + // by non-relative path. + pub fn excludes( + &self, + index: &gix_index::State, + overrides: Option<gix_ignore::Search>, + source: gix_worktree::cache::state::ignore::Source, + ) -> Result<gix_worktree::Cache, config::exclude_stack::Error> { + let case = if self.config.ignore_case { + gix_glob::pattern::Case::Fold + } else { + gix_glob::pattern::Case::Sensitive + }; + let mut buf = Vec::with_capacity(512); + let ignore = self + .config + .assemble_exclude_globals(self.git_dir(), overrides, source, &mut buf)?; + let state = gix_worktree::cache::State::IgnoreStack(ignore); + let attribute_list = state.id_mappings_from_index(index, index.path_backing(), source, case); + Ok(gix_worktree::Cache::new( + // this is alright as we don't cause mutation of that directory, it's virtual. + self.work_dir().unwrap_or(self.git_dir()), + state, + case, + buf, + attribute_list, + )) + } +} diff --git a/vendor/gix/src/repository/impls.rs b/vendor/gix/src/repository/impls.rs index 6cf2b2e9b..5da55290c 100644 --- a/vendor/gix/src/repository/impls.rs +++ b/vendor/gix/src/repository/impls.rs @@ -8,6 +8,7 @@ impl Clone for crate::Repository { self.config.clone(), self.options.clone(), self.index.clone(), + self.shallow_commits.clone(), ) } } @@ -40,6 +41,7 @@ impl From<&crate::ThreadSafeRepository> for crate::Repository { repo.config.clone(), repo.linked_worktree_options.clone(), repo.index.clone(), + repo.shallow_commits.clone(), ) } } @@ -54,6 +56,7 @@ impl From<crate::ThreadSafeRepository> for crate::Repository { repo.config, repo.linked_worktree_options, repo.index, + repo.shallow_commits, ) } } @@ -68,6 +71,7 @@ impl From<crate::Repository> for crate::ThreadSafeRepository { config: r.config, linked_worktree_options: r.options, index: r.index, + shallow_commits: r.shallow_commits, } } } diff --git a/vendor/gix/src/repository/init.rs b/vendor/gix/src/repository/init.rs index ae6a42c3b..16659a013 100644 --- a/vendor/gix/src/repository/init.rs +++ b/vendor/gix/src/repository/init.rs @@ -1,6 +1,7 @@ use std::cell::RefCell; impl crate::Repository { + #[allow(clippy::too_many_arguments)] pub(crate) fn from_refs_and_objects( refs: crate::RefStore, objects: crate::OdbHandle, @@ -9,6 +10,7 @@ impl crate::Repository { config: crate::config::Cache, linked_worktree_options: crate::open::Options, index: crate::worktree::IndexStorage, + shallow_commits: crate::shallow::CommitsStorage, ) -> Self { let objects = setup_objects(objects, &config); crate::Repository { @@ -20,6 +22,7 @@ impl crate::Repository { config, options: linked_worktree_options, index, + shallow_commits, } } diff --git a/vendor/gix/src/repository/mod.rs b/vendor/gix/src/repository/mod.rs index 31199e22d..5b7a70d3b 100644 --- a/vendor/gix/src/repository/mod.rs +++ b/vendor/gix/src/repository/mod.rs @@ -19,17 +19,19 @@ impl crate::Repository { } } +mod attributes; mod cache; mod config; +mod excludes; pub(crate) mod identity; mod impls; mod init; mod location; mod object; -pub(crate) mod permissions; mod reference; mod remote; mod revision; +mod shallow; mod snapshots; mod state; mod thread_safe; diff --git a/vendor/gix/src/repository/object.rs b/vendor/gix/src/repository/object.rs index bda1a54c3..f4592475f 100644 --- a/vendor/gix/src/repository/object.rs +++ b/vendor/gix/src/repository/object.rs @@ -1,5 +1,6 @@ #![allow(clippy::result_large_err)] use std::convert::TryInto; +use std::ops::DerefMut; use gix_hash::ObjectId; use gix_odb::{Find, FindExt, Write}; @@ -36,7 +37,7 @@ impl crate::Repository { Ok(Object::from_data(id, kind, buf, self)) } - /// Try to find the object with `id` or return `None` it it wasn't found. + /// Try to find the object with `id` or return `None` if it wasn't found. pub fn try_find_object(&self, id: impl Into<ObjectId>) -> Result<Option<Object<'_>>, object::find::Error> { let id = id.into(); if id == gix_hash::ObjectId::empty_tree(self.object_hash()) { @@ -58,32 +59,71 @@ impl crate::Repository { } } + fn shared_empty_buf(&self) -> std::cell::RefMut<'_, Vec<u8>> { + let mut bufs = self.bufs.borrow_mut(); + if bufs.last().is_none() { + bufs.push(Vec::with_capacity(512)); + } + std::cell::RefMut::map(bufs, |bufs| { + let buf = bufs.last_mut().expect("we assure one is present"); + buf.clear(); + buf + }) + } + /// Write the given object into the object database and return its object id. + /// + /// Note that we hash the object in memory to avoid storing objects that are already present. That way, + /// we avoid writing duplicate objects using slow disks that will eventually have to be garbage collected. pub fn write_object(&self, object: impl gix_object::WriteTo) -> Result<Id<'_>, object::write::Error> { + let mut buf = self.shared_empty_buf(); + object.write_to(buf.deref_mut())?; + + let oid = gix_object::compute_hash(self.object_hash(), object.kind(), &buf); + if self.objects.contains(oid) { + return Ok(oid.attach(self)); + } + self.objects - .write(object) + .write_buf(object.kind(), &buf) .map(|oid| oid.attach(self)) .map_err(Into::into) } /// Write a blob from the given `bytes`. + /// + /// We avoid writing duplicate objects to slow disks that will eventually have to be garbage collected by + /// pre-hashing the data, and checking if the object is already present. pub fn write_blob(&self, bytes: impl AsRef<[u8]>) -> Result<Id<'_>, object::write::Error> { + let bytes = bytes.as_ref(); + let oid = gix_object::compute_hash(self.object_hash(), gix_object::Kind::Blob, bytes); + if self.objects.contains(oid) { + return Ok(oid.attach(self)); + } self.objects - .write_buf(gix_object::Kind::Blob, bytes.as_ref()) + .write_buf(gix_object::Kind::Blob, bytes) .map(|oid| oid.attach(self)) } /// Write a blob from the given `Read` implementation. + /// + /// Note that we hash the object in memory to avoid storing objects that are already present. That way, + /// we avoid writing duplicate objects using slow disks that will eventually have to be garbage collected. + /// + /// If that is prohibitive, use the object database directly. pub fn write_blob_stream( &self, mut bytes: impl std::io::Read + std::io::Seek, ) -> Result<Id<'_>, object::write::Error> { - let current = bytes.stream_position()?; - let len = bytes.seek(std::io::SeekFrom::End(0))? - current; - bytes.seek(std::io::SeekFrom::Start(current))?; + let mut buf = self.shared_empty_buf(); + std::io::copy(&mut bytes, buf.deref_mut())?; + let oid = gix_object::compute_hash(self.object_hash(), gix_object::Kind::Blob, &buf); + if self.objects.contains(oid) { + return Ok(oid.attach(self)); + } self.objects - .write_stream(gix_object::Kind::Blob, len, bytes) + .write_buf(gix_object::Kind::Blob, &buf) .map(|oid| oid.attach(self)) } diff --git a/vendor/gix/src/repository/permissions.rs b/vendor/gix/src/repository/permissions.rs index 88b61b739..633575a9d 100644 --- a/vendor/gix/src/repository/permissions.rs +++ b/vendor/gix/src/repository/permissions.rs @@ -1,14 +1,7 @@ +//! Various permissions to define what can be done when operating a [`Repository`][crate::Repository]. +use crate::open::Permissions; use gix_sec::Trust; -/// Permissions associated with various resources of a git repository -#[derive(Debug, Clone)] -pub struct Permissions { - /// Permissions related to the environment - pub env: Environment, - /// Permissions related to the handling of git configuration. - pub config: Config, -} - /// Configure from which sources git configuration may be loaded. /// /// Note that configuration from inside of the repository is always loaded as it's definitely required for correctness. @@ -17,7 +10,7 @@ pub struct Config { /// The git binary may come with configuration as part of its configuration, and if this is true (default false) /// we will load the configuration of the git binary, if present and not a duplicate of the ones below. /// - /// It's disable by default as it involves executing the git binary once per execution of the application. + /// It's disabled by default as it may involve executing the git binary once per execution of the application. pub git_binary: bool, /// Whether to use the system configuration. /// This is defined as `$(prefix)/etc/gitconfig` on unix. @@ -50,6 +43,18 @@ impl Config { includes: true, } } + + /// Load only configuration local to the git repository. + pub fn isolated() -> Self { + Config { + git_binary: false, + system: false, + git: false, + user: false, + env: false, + includes: false, + } + } } impl Default for Config { @@ -58,8 +63,55 @@ impl Default for Config { } } +/// Configure from which `gitattribute` files may be loaded. +/// +/// Note that `.gitattribute` files from within the repository are always loaded. +#[derive(Copy, Clone, Ord, PartialOrd, PartialEq, Eq, Debug, Hash)] +pub struct Attributes { + /// The git binary may come with attribute configuration in its installation directory, and if this is true (default false) + /// we will load the configuration of the git binary. + /// + /// It's disabled by default as it involves executing the git binary once per execution of the application. + pub git_binary: bool, + /// Whether to use the system configuration. + /// This is typically defined as `$(prefix)/etc/gitconfig`. + pub system: bool, + /// Whether to use the git application configuration. + /// + /// A platform defined location for where a user's git application configuration should be located. + /// If `$XDG_CONFIG_HOME` is not set or empty, `$HOME/.config/git/attributes` will be used + /// on unix. + pub git: bool, +} + +impl Attributes { + /// Allow everything which usually relates to a fully trusted environment + pub fn all() -> Self { + Attributes { + git_binary: false, + system: true, + git: true, + } + } + + /// Allow loading attributes that are local to the git repository. + pub fn isolated() -> Self { + Attributes { + git_binary: false, + system: false, + git: false, + } + } +} + +impl Default for Attributes { + fn default() -> Self { + Self::all() + } +} + /// Permissions related to the usage of environment variables -#[derive(Debug, Clone)] +#[derive(Debug, Clone, Copy)] pub struct Environment { /// Control whether resources pointed to by `XDG_CONFIG_HOME` can be used when looking up common configuration values. /// @@ -101,18 +153,29 @@ impl Environment { objects: allow, } } + + /// Don't allow loading any environment variables. + pub fn isolated() -> Self { + let deny = gix_sec::Permission::Deny; + Environment { + xdg_config_home: deny, + home: deny, + ssh_prefix: deny, + git_prefix: deny, + http_transport: deny, + identity: deny, + objects: deny, + } + } } impl Permissions { - /// Return permissions that will not include configuration files not owned by the current user, - /// but trust system and global configuration files along with those which are owned by the current user. - /// - /// This allows to read and write repositories even if they aren't owned by the current user, but avoid using - /// anything else that could cause us to write into unknown locations or use programs beyond our `PATH`. + /// Secure permissions are similar to `all()` pub fn secure() -> Self { Permissions { env: Environment::all(), config: Config::all(), + attributes: Attributes::all(), } } @@ -122,32 +185,16 @@ impl Permissions { Permissions { env: Environment::all(), config: Config::all(), + attributes: Attributes::all(), } } /// Don't read any but the local git configuration and deny reading any environment variables. pub fn isolated() -> Self { Permissions { - config: Config { - git_binary: false, - system: false, - git: false, - user: false, - env: false, - includes: false, - }, - env: { - let deny = gix_sec::Permission::Deny; - Environment { - xdg_config_home: deny, - home: deny, - ssh_prefix: deny, - git_prefix: deny, - http_transport: deny, - identity: deny, - objects: deny, - } - }, + config: Config::isolated(), + attributes: Attributes::isolated(), + env: Environment::isolated(), } } } diff --git a/vendor/gix/src/repository/shallow.rs b/vendor/gix/src/repository/shallow.rs new file mode 100644 index 000000000..7fac83a55 --- /dev/null +++ b/vendor/gix/src/repository/shallow.rs @@ -0,0 +1,65 @@ +use std::{borrow::Cow, path::PathBuf}; + +use crate::{ + bstr::ByteSlice, + config::tree::{gitoxide, Key}, + Repository, +}; + +impl Repository { + /// Return `true` if the repository is a shallow clone, i.e. contains history only up to a certain depth. + pub fn is_shallow(&self) -> bool { + self.shallow_file() + .metadata() + .map_or(false, |m| m.is_file() && m.len() > 0) + } + + /// Return a shared list of shallow commits which is updated automatically if the in-memory snapshot has become stale + /// as the underlying file on disk has changed. + /// + /// The list of shallow commits represents the shallow boundary, beyond which we are lacking all (parent) commits. + /// Note that the list is never empty, as `Ok(None)` is returned in that case indicating the repository + /// isn't a shallow clone. + /// + /// The shared list is shared across all clones of this repository. + pub fn shallow_commits(&self) -> Result<Option<crate::shallow::Commits>, crate::shallow::open::Error> { + self.shallow_commits.recent_snapshot( + || self.shallow_file().metadata().ok().and_then(|m| m.modified().ok()), + || { + let buf = match std::fs::read(self.shallow_file()) { + Ok(buf) => buf, + Err(err) if err.kind() == std::io::ErrorKind::NotFound => return Ok(None), + Err(err) => return Err(err.into()), + }; + + let mut commits = buf + .lines() + .map(gix_hash::ObjectId::from_hex) + .collect::<Result<Vec<_>, _>>()?; + + commits.sort(); + if commits.is_empty() { + Ok(None) + } else { + Ok(Some(commits)) + } + }, + ) + } + + /// Return the path to the `shallow` file which contains hashes, one per line, that describe commits that don't have their + /// parents within this repository. + /// + /// Note that it may not exist if the repository isn't actually shallow. + pub fn shallow_file(&self) -> PathBuf { + let shallow_name = self + .config + .resolved + .string_filter_by_key( + gitoxide::Core::SHALLOW_FILE.logical_name().as_str(), + &mut self.filter_config_section(), + ) + .unwrap_or_else(|| Cow::Borrowed("shallow".into())); + self.common_dir().join(gix_path::from_bstr(shallow_name)) + } +} diff --git a/vendor/gix/src/repository/worktree.rs b/vendor/gix/src/repository/worktree.rs index 2de31bc86..316009d29 100644 --- a/vendor/gix/src/repository/worktree.rs +++ b/vendor/gix/src/repository/worktree.rs @@ -1,6 +1,7 @@ +use crate::config::cache::util::ApplyLeniencyDefault; use crate::{worktree, Worktree}; -/// Worktree iteration +/// Interact with individual worktrees and their information. impl crate::Repository { /// Return a list of all _linked_ worktrees sorted by private git dir path as a lightweight proxy. /// @@ -25,10 +26,6 @@ impl crate::Repository { res.sort_by(|a, b| a.git_dir.cmp(&b.git_dir)); Ok(res) } -} - -/// Interact with individual worktrees and their information. -impl crate::Repository { /// Return the repository owning the main worktree, typically from a linked worktree. /// /// Note that it might be the one that is currently open if this repository doesn't point to a linked worktree. @@ -58,23 +55,14 @@ impl crate::Repository { /// /// It will use the `index.threads` configuration key to learn how many threads to use. /// Note that it may fail if there is no index. - // TODO: test pub fn open_index(&self) -> Result<gix_index::File, worktree::open_index::Error> { let thread_limit = self .config .resolved - .boolean("index", None, "threads") - .map(|res| { - res.map(|value| usize::from(!value)).or_else(|err| { - gix_config::Integer::try_from(err.input.as_ref()) - .map_err(|err| worktree::open_index::Error::ConfigIndexThreads { - value: err.input.clone(), - err, - }) - .map(|value| value.to_decimal().and_then(|v| v.try_into().ok()).unwrap_or(1)) - }) - }) - .transpose()?; + .string("index", None, "threads") + .map(|value| crate::config::tree::Index::THREADS.try_into_index_threads(value)) + .transpose() + .with_lenient_default(self.config.lenient_config)?; gix_index::File::at( self.index_path(), self.object_hash(), diff --git a/vendor/gix/src/revision/spec/parse/types.rs b/vendor/gix/src/revision/spec/parse/types.rs index 4e523ab14..d852c297e 100644 --- a/vendor/gix/src/revision/spec/parse/types.rs +++ b/vendor/gix/src/revision/spec/parse/types.rs @@ -1,7 +1,7 @@ use crate::{bstr::BString, object, reference}; /// A hint to know what to do if refs and object names are equal. -#[derive(Debug, Copy, Clone, PartialEq, Eq)] +#[derive(Default, Debug, Copy, Clone, PartialEq, Eq)] pub enum RefsHint { /// This is the default, and leads to specs that look like objects identified by full hex sha and are objects to be used /// instead of similarly named references. The latter is not typical but can absolutely happen by accident. @@ -9,6 +9,7 @@ pub enum RefsHint { /// preferred as there are many valid object names like `beef` and `cafe` that are short and both valid and typical prefixes /// for objects. /// Git chooses this as default as well, even though it means that every object prefix is also looked up as ref. + #[default] PreferObjectOnFullLengthHexShaUseRefOtherwise, /// No matter what, if it looks like an object prefix and has an object, use it. /// Note that no ref-lookup is made here which is the fastest option. @@ -38,12 +39,6 @@ pub enum ObjectKindHint { Blob, } -impl Default for RefsHint { - fn default() -> Self { - RefsHint::PreferObjectOnFullLengthHexShaUseRefOtherwise - } -} - /// Options for use in [`revision::Spec::from_bstr()`][crate::revision::Spec::from_bstr()]. #[derive(Debug, Default, Copy, Clone)] pub struct Options { @@ -177,6 +172,8 @@ pub enum Error { }, #[error(transparent)] Traverse(#[from] gix_traverse::commit::ancestors::Error), + #[error(transparent)] + Walk(#[from] crate::revision::walk::Error), #[error("Spec does not contain a single object id")] SingleNotFound, } diff --git a/vendor/gix/src/revision/walk.rs b/vendor/gix/src/revision/walk.rs index 5b04b43a7..9c545d0d4 100644 --- a/vendor/gix/src/revision/walk.rs +++ b/vendor/gix/src/revision/walk.rs @@ -3,6 +3,16 @@ use gix_odb::FindExt; use crate::{revision, Repository}; +/// The error returned by [`Platform::all()`]. +#[derive(Debug, thiserror::Error)] +#[allow(missing_docs)] +pub enum Error { + #[error(transparent)] + AncestorIter(#[from] gix_traverse::commit::ancestors::Error), + #[error(transparent)] + ShallowCommits(#[from] crate::shallow::open::Error), +} + /// A platform to traverse the revision graph by adding starting points as well as points which shouldn't be crossed, /// returned by [`Repository::rev_walk()`]. pub struct Platform<'repo> { @@ -40,13 +50,14 @@ impl<'repo> Platform<'repo> { /// Produce the iterator impl<'repo> Platform<'repo> { - /// Return an iterator to traverse all commits reachable as configured by the [Platform]. - /// - /// # Performance + /// For each commit, let `filter` return `true` if it and its parents should be included in the traversal, or `false` + /// if the traversal should exclude it and its ancestry entirely. /// - /// It's highly recommended to set an [`object cache`][Repository::object_cache_size()] on the parent repo - /// to greatly speed up performance if the returned id is supposed to be looked up right after. - pub fn all(self) -> Result<revision::Walk<'repo>, gix_traverse::commit::ancestors::Error> { + /// If `filter` is None, no pruning of the graph will be performed which is the default. + pub fn selected( + self, + mut filter: impl FnMut(&gix_hash::oid) -> bool + 'repo, + ) -> Result<revision::Walk<'repo>, Error> { let Platform { repo, tips, @@ -56,18 +67,52 @@ impl<'repo> Platform<'repo> { Ok(revision::Walk { repo, inner: Box::new( - gix_traverse::commit::Ancestors::new( + gix_traverse::commit::Ancestors::filtered( tips, gix_traverse::commit::ancestors::State::default(), move |oid, buf| repo.objects.find_commit_iter(oid, buf), + { + let shallow_commits = repo.shallow_commits()?; + let mut grafted_parents_to_skip = Vec::new(); + let mut buf = Vec::new(); + move |id| { + if !filter(id) { + return false; + } + match shallow_commits.as_ref() { + Some(commits) => { + let id = id.to_owned(); + if let Ok(idx) = grafted_parents_to_skip.binary_search(&id) { + grafted_parents_to_skip.remove(idx); + return false; + }; + if commits.binary_search(&id).is_ok() { + if let Ok(commit) = repo.objects.find_commit_iter(id, &mut buf) { + grafted_parents_to_skip.extend(commit.parent_ids()); + grafted_parents_to_skip.sort(); + } + }; + true + } + None => true, + } + } + }, ) .sorting(sorting)? .parents(parents), ), - is_shallow: None, - error_on_missing_commit: false, }) } + /// Return an iterator to traverse all commits reachable as configured by the [Platform]. + /// + /// # Performance + /// + /// It's highly recommended to set an [`object cache`][Repository::object_cache_size()] on the parent repo + /// to greatly speed up performance if the returned id is supposed to be looked up right after. + pub fn all(self) -> Result<revision::Walk<'repo>, Error> { + self.selected(|_| true) + } } pub(crate) mod iter { @@ -78,50 +123,13 @@ pub(crate) mod iter { pub(crate) repo: &'repo crate::Repository, pub(crate) inner: Box<dyn Iterator<Item = Result<gix_hash::ObjectId, gix_traverse::commit::ancestors::Error>> + 'repo>, - pub(crate) error_on_missing_commit: bool, - // TODO: tests - /// After iteration this flag is true if the iteration was stopped prematurely due to missing parent commits. - /// Note that this flag won't be `Some` if any iteration error occurs, which is the case if - /// [`error_on_missing_commit()`][Walk::error_on_missing_commit()] was called. - /// - /// This happens if a repository is a shallow clone. - /// Note that this value is `None` as long as the iteration isn't complete. - pub is_shallow: Option<bool>, - } - - impl<'repo> Walk<'repo> { - // TODO: tests - /// Once invoked, the iteration will return an error if a commit cannot be found in the object database. This typically happens - /// when operating on a shallow clone and thus is non-critical by default. - /// - /// Check the [`is_shallow`][Walk::is_shallow] field once the iteration ended otherwise to learn if a shallow commit graph - /// was encountered. - pub fn error_on_missing_commit(mut self) -> Self { - self.error_on_missing_commit = true; - self - } } impl<'repo> Iterator for Walk<'repo> { type Item = Result<Id<'repo>, gix_traverse::commit::ancestors::Error>; fn next(&mut self) -> Option<Self::Item> { - match self.inner.next() { - None => { - self.is_shallow = Some(false); - None - } - Some(Ok(oid)) => Some(Ok(oid.attach(self.repo))), - Some(Err(err @ gix_traverse::commit::ancestors::Error::FindExisting { .. })) => { - if self.error_on_missing_commit { - Some(Err(err)) - } else { - self.is_shallow = Some(true); - None - } - } - Some(Err(err)) => Some(Err(err)), - } + self.inner.next().map(|res| res.map(|id| id.attach(self.repo))) } } } diff --git a/vendor/gix/src/shallow.rs b/vendor/gix/src/shallow.rs new file mode 100644 index 000000000..d49653a65 --- /dev/null +++ b/vendor/gix/src/shallow.rs @@ -0,0 +1,92 @@ +pub(crate) type CommitsStorage = + gix_features::threading::OwnShared<gix_fs::SharedFileSnapshotMut<Vec<gix_hash::ObjectId>>>; +/// A lazily loaded and auto-updated list of commits which are at the shallow boundary (behind which there are no commits available), +/// sorted to allow bisecting. +pub type Commits = gix_fs::SharedFileSnapshot<Vec<gix_hash::ObjectId>>; + +/// +#[cfg(any(feature = "blocking-network-client", feature = "async-network-client"))] +pub mod write { + pub(crate) mod function { + use std::io::Write; + + use gix_protocol::fetch::response::ShallowUpdate; + + use crate::shallow::{write::Error, Commits}; + + /// Write the previously obtained (possibly non-existing) `shallow_commits` to the shallow `file` + /// after applying all `updates`. + /// + /// If this leaves the list of shallow commits empty, the file is removed. + /// + /// ### Deviation + /// + /// Git also prunes the set of shallow commits while writing, we don't until we support some sort of pruning. + pub fn write( + mut file: gix_lock::File, + shallow_commits: Option<Commits>, + updates: &[ShallowUpdate], + ) -> Result<(), Error> { + let mut shallow_commits = shallow_commits.map(|sc| (**sc).to_owned()).unwrap_or_default(); + for update in updates { + match update { + ShallowUpdate::Shallow(id) => { + shallow_commits.push(*id); + } + ShallowUpdate::Unshallow(id) => shallow_commits.retain(|oid| oid != id), + } + } + if shallow_commits.is_empty() { + std::fs::remove_file(file.resource_path())?; + drop(file); + return Ok(()); + } + + if shallow_commits.is_empty() { + if let Err(err) = std::fs::remove_file(file.resource_path()) { + if err.kind() != std::io::ErrorKind::NotFound { + return Err(err.into()); + } + } + } else { + shallow_commits.sort(); + let mut buf = Vec::<u8>::new(); + for commit in shallow_commits { + commit.write_hex_to(&mut buf).map_err(Error::Io)?; + buf.push(b'\n'); + } + file.write_all(&buf).map_err(Error::Io)?; + file.flush()?; + } + file.commit()?; + Ok(()) + } + } + + /// The error returned by [`write()`][crate::shallow::write()]. + #[derive(Debug, thiserror::Error)] + #[allow(missing_docs)] + pub enum Error { + #[error(transparent)] + Commit(#[from] gix_lock::commit::Error<gix_lock::File>), + #[error("Could not remove an empty shallow file")] + RemoveEmpty(#[from] std::io::Error), + #[error("Failed to write object id to shallow file")] + Io(std::io::Error), + } +} +#[cfg(any(feature = "blocking-network-client", feature = "async-network-client"))] +pub use write::function::write; + +/// +pub mod open { + /// The error returned by [`Repository::shallow_commits()`][crate::Repository::shallow_commits()]. + #[derive(Debug, thiserror::Error)] + #[allow(missing_docs)] + pub enum Error { + #[error("Could not open shallow file for reading")] + Io(#[from] std::io::Error), + #[error("Could not decode a line in shallow file as hex-encoded object hash")] + DecodeHash(#[from] gix_hash::decode::Error), + } +} diff --git a/vendor/gix/src/state.rs b/vendor/gix/src/state.rs new file mode 100644 index 000000000..d8ee99835 --- /dev/null +++ b/vendor/gix/src/state.rs @@ -0,0 +1,25 @@ +/// Tell what operation is currently in progress. +#[derive(Debug, PartialEq, Eq)] +pub enum InProgress { + /// A mailbox is being applied. + ApplyMailbox, + /// A rebase is happening while a mailbox is being applied. + // TODO: test + ApplyMailboxRebase, + /// A git bisect operation has not yet been concluded. + Bisect, + /// A cherry pick operation. + CherryPick, + /// A cherry pick with multiple commits pending. + CherryPickSequence, + /// A merge operation. + Merge, + /// A rebase operation. + Rebase, + /// An interactive rebase operation. + RebaseInteractive, + /// A revert operation. + Revert, + /// A revert operation with multiple commits pending. + RevertSequence, +} diff --git a/vendor/gix/src/types.rs b/vendor/gix/src/types.rs index 34ffdc8bf..eafa6a3f8 100644 --- a/vendor/gix/src/types.rs +++ b/vendor/gix/src/types.rs @@ -152,6 +152,7 @@ pub struct Repository { /// Particularly useful when following linked worktrees and instantiating new equally configured worktree repositories. pub(crate) options: crate::open::Options, pub(crate) index: crate::worktree::IndexStorage, + pub(crate) shallow_commits: crate::shallow::CommitsStorage, } /// An instance with access to everything a git repository entails, best imagined as container implementing `Sync + Send` for _most_ @@ -175,6 +176,7 @@ pub struct ThreadSafeRepository { pub(crate) linked_worktree_options: crate::open::Options, /// The index of this instances worktree. pub(crate) index: crate::worktree::IndexStorage, + pub(crate) shallow_commits: crate::shallow::CommitsStorage, } /// A remote which represents a way to interact with hosts for remote clones of the parent repository. diff --git a/vendor/gix/src/worktree/mod.rs b/vendor/gix/src/worktree/mod.rs index 19a44a900..8db123554 100644 --- a/vendor/gix/src/worktree/mod.rs +++ b/vendor/gix/src/worktree/mod.rs @@ -7,9 +7,9 @@ use crate::{ Repository, }; -pub(crate) type IndexStorage = gix_features::threading::OwnShared<gix_features::fs::MutableSnapshot<gix_index::File>>; +pub(crate) type IndexStorage = gix_features::threading::OwnShared<gix_fs::SharedFileSnapshotMut<gix_index::File>>; /// A lazily loaded and auto-updated worktree index. -pub type Index = gix_features::fs::SharedSnapshot<gix_index::File>; +pub type Index = gix_fs::SharedFileSnapshot<gix_index::File>; /// A stand-in to a worktree as result of a worktree iteration. /// @@ -71,18 +71,12 @@ pub mod proxy; /// pub mod open_index { - use crate::bstr::BString; - /// The error returned by [`Worktree::open_index()`][crate::Worktree::open_index()]. #[derive(Debug, thiserror::Error)] #[allow(missing_docs)] pub enum Error { - #[error("Could not interpret value '{}' as 'index.threads'", .value)] - ConfigIndexThreads { - value: BString, - #[source] - err: gix_config::value::Error, - }, + #[error(transparent)] + ConfigIndexThreads(#[from] crate::config::key::GenericErrorWithValue), #[error(transparent)] IndexFile(#[from] gix_index::file::init::Error), } @@ -102,59 +96,64 @@ pub mod open_index { /// pub mod excludes { - use std::path::PathBuf; - /// The error returned by [`Worktree::excludes()`][crate::Worktree::excludes()]. #[derive(Debug, thiserror::Error)] #[allow(missing_docs)] pub enum Error { - #[error("Could not read repository exclude.")] - Io(#[from] std::io::Error), #[error(transparent)] - EnvironmentPermission(#[from] gix_sec::permission::Error<PathBuf>), - #[error("The value for `core.excludesFile` could not be read from configuration")] - ExcludesFilePathInterpolation(#[from] gix_config::path::interpolate::Error), + OpenIndex(#[from] crate::worktree::open_index::Error), + #[error(transparent)] + CreateCache(#[from] crate::config::exclude_stack::Error), } impl<'repo> crate::Worktree<'repo> { /// Configure a file-system cache checking if files below the repository are excluded. /// - /// This takes into consideration all the usual repository configuration. - // TODO: test, provide higher-level interface that is much easier to use and doesn't panic. - pub fn excludes( - &self, - index: &gix_index::State, - overrides: Option<gix_attributes::MatchGroup<gix_attributes::Ignore>>, - ) -> Result<gix_worktree::fs::Cache, Error> { - let repo = self.parent; - let case = repo - .config - .ignore_case - .then_some(gix_glob::pattern::Case::Fold) - .unwrap_or_default(); - let mut buf = Vec::with_capacity(512); - let excludes_file = match repo.config.excludes_file().transpose()? { - Some(user_path) => Some(user_path), - None => repo.config.xdg_config_path("ignore")?, - }; - let state = gix_worktree::fs::cache::State::IgnoreStack(gix_worktree::fs::cache::state::Ignore::new( - overrides.unwrap_or_default(), - gix_attributes::MatchGroup::<gix_attributes::Ignore>::from_git_dir( - repo.git_dir(), - excludes_file, - &mut buf, - )?, - None, - case, - )); - let attribute_list = state.build_attribute_list(index, index.path_backing(), case); - Ok(gix_worktree::fs::Cache::new( - self.path, - state, - case, - buf, - attribute_list, - )) + /// This takes into consideration all the usual repository configuration, namely: + /// + /// * `$XDG_CONFIG_HOME/…/ignore` if `core.excludesFile` is *not* set, otherwise use the configured file. + /// * `$GIT_DIR/info/exclude` if present. + /// + /// When only excludes are desired, this is the most efficient way to obtain them. Otherwise use + /// [`Worktree::attributes()`][crate::Worktree::attributes()] for accessing both attributes and excludes. + pub fn excludes(&self, overrides: Option<gix_ignore::Search>) -> Result<gix_worktree::Cache, Error> { + let index = self.index()?; + Ok(self.parent.excludes( + &index, + overrides, + gix_worktree::cache::state::ignore::Source::WorktreeThenIdMappingIfNotSkipped, + )?) + } + } +} + +/// +pub mod attributes { + /// The error returned by [`Worktree::attributes()`][crate::Worktree::attributes()]. + #[derive(Debug, thiserror::Error)] + #[allow(missing_docs)] + pub enum Error { + #[error(transparent)] + OpenIndex(#[from] crate::worktree::open_index::Error), + #[error(transparent)] + CreateCache(#[from] crate::attributes::Error), + } + + impl<'repo> crate::Worktree<'repo> { + /// Configure a file-system cache checking if files below the repository are excluded or for querying their attributes. + /// + /// This takes into consideration all the usual repository configuration, namely: + /// + /// * `$XDG_CONFIG_HOME/…/ignore|attributes` if `core.excludesFile|attributesFile` is *not* set, otherwise use the configured file. + /// * `$GIT_DIR/info/exclude|attributes` if present. + pub fn attributes(&self, overrides: Option<gix_ignore::Search>) -> Result<gix_worktree::Cache, Error> { + let index = self.index()?; + Ok(self.parent.attributes( + &index, + gix_worktree::cache::state::attributes::Source::WorktreeThenIdMapping, + gix_worktree::cache::state::ignore::Source::WorktreeThenIdMappingIfNotSkipped, + overrides, + )?) } } } |