diff --git a/Cargo.lock b/Cargo.lock index 549f9ad5..9d746b05 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -322,9 +322,9 @@ dependencies = [ [[package]] name = "gix" -version = "0.49.1" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eb22530188fa1a6921b9f1aed3183357936e450ed060d65e578b46cd1c66a33" +checksum = "41e278c81b66e27876235fe5415da6fa709b2c8c82e1d1387c30c426982aa6a7" dependencies = [ "gix-actor", "gix-attributes", @@ -371,9 +371,9 @@ dependencies = [ [[package]] name = "gix-actor" -version = "0.24.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b2ec47eabd8edbb375e1c5cf11a2673805ae2ee02f797923fcefc3106d39f3b" +checksum = "c7606482631d56cc6bfba3394ae42fc64927635024298befbb7923b6144774e8" dependencies = [ "bstr", "btoi", @@ -385,9 +385,9 @@ dependencies = [ [[package]] name = "gix-attributes" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f97977acd02cb3369833a428b38d74960fa90dc6f58312e54e9388f293b0d93b" +checksum = "63a134a674e39e238bd273326a9815296cc71f867ad5466518da71392cff98ce" dependencies = [ "bstr", "gix-glob", @@ -402,36 +402,36 @@ dependencies = [ [[package]] name = "gix-bitmap" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "311e2fa997be6560c564b070c5da2d56d038b645a94e1e5796d5d85a350da33c" +checksum = "0aa8bbde7551a9e3e783a2871f53bbb0f50aac7a77db5680c8709f69e8ce724f" dependencies = [ "thiserror", ] [[package]] name = "gix-chunk" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39db5ed0fc0a2e9b1b8265993f7efdbc30379dec268f3b91b7af0c2de4672fdd" +checksum = "5b42ea64420f7994000130328f3c7a2038f639120518870436d31b8bde704493" dependencies = [ "thiserror", ] [[package]] name = "gix-command" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "378d6a93c87616a58f2c5b40ed0ca554255ba4ce3aa35cf1d597b270d06756a7" +checksum = "2783ad148fb16bf9cfd46423706ba552a62a4d4a18fda5dd07648eb0228862dd" dependencies = [ "bstr", ] [[package]] name = "gix-commitgraph" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9792d974e0a54e4655b676058e0b84a76e380fa82405f296734c1f943c5c8a5" +checksum = "c4c2d5ce99eba59fe9477a9e3037b0e1d0266d53925cc4b322bc06c566589b99" dependencies = [ "bstr", "gix-chunk", @@ -443,9 +443,9 @@ dependencies = [ [[package]] name = "gix-config" -version = "0.26.0" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfc134ddb07881832e50620f4b3dc0e5cb6734b80509d582a0c2bd31869f8f7f" +checksum = "b51e83bd9d08118e0ff06ea14be953c418b4c056e57d93c8103e777584e48b0a" dependencies = [ "bstr", "gix-config-value", @@ -465,9 +465,9 @@ dependencies = [ [[package]] name = "gix-config-value" -version = "0.12.4" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "731170f6ada8932ddd990548f98354cc1d027509caddfdf0c8e2c0c5e94d7d1b" +checksum = "6e874f41437441c02991dcea76990b9058fadfc54b02ab4dd06ab2218af43897" dependencies = [ "bitflags 2.3.3", "bstr", @@ -478,9 +478,9 @@ dependencies = [ [[package]] name = "gix-credentials" -version = "0.17.0" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0696fcd658b6526beff1c2716d3c94466eb2dbfaf1ecf8d961883884b687ce6d" +checksum = "307d91ec5f7c8e9bfaa217fe30c2e0099101cbe83dbed27a222dbb6def38725f" dependencies = [ "bstr", "gix-command", @@ -494,9 +494,9 @@ dependencies = [ [[package]] name = "gix-date" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9a04a1d2387c955ec91059d56b673000dd24f3c07cad08ed253e36381782bf" +checksum = "56b0312dba1ad003d9b8c502bed52fbcf106f8de3a9a26bfa7b45642a6f94b72" dependencies = [ "bstr", "itoa", @@ -506,9 +506,9 @@ dependencies = [ [[package]] name = "gix-diff" -version = "0.33.0" +version = "0.33.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accf7bfad64777ab5297bd918431f359fb39eb1d519743c2059ba5af7a513229" +checksum = "9a49d7a9a9ed5ec3428c3061da45d0fc5f50b3c07b91ea4e7ec4959668f25f6c" dependencies = [ "gix-hash", "gix-object", @@ -518,9 +518,9 @@ dependencies = [ [[package]] name = "gix-discover" -version = "0.22.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ddcd031c607da6acb52f6c8e3c0a50cc444ed03d444d22c6a2a772ea70a051" +checksum = "041480eb03d8aa0894d9b73d25d182d51bc4d0ea8925a6ee0c971262bbc7715e" dependencies = [ "bstr", "dunce", @@ -533,9 +533,9 @@ dependencies = [ [[package]] name = "gix-features" -version = "0.32.0" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f708dc9875d1b3e05c1cbadfd22e5b543c733c511191798587ec479115664221" +checksum = "882695cccf38da4c3cc7ee687bdb412cf25e37932d7f8f2c306112ea712449f1" dependencies = [ "crc32fast", "flate2", @@ -551,9 +551,9 @@ dependencies = [ [[package]] name = "gix-filter" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8c9b3fc103a4976e4991ad949a9929fe6da5499e9f788b7f207471ec21763c7" +checksum = "ef4d4d61f2ab07de4612f8e078d7f1a443c7ab5c40f382784c8eacdf0fd172b9" dependencies = [ "bstr", "encoding_rs", @@ -571,18 +571,18 @@ dependencies = [ [[package]] name = "gix-fs" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86ca81d3888c5b0ac908cbe6ee975451b117b475324987f8aecf42bc5d9e4279" +checksum = "4d5b6e9d34a2c61ea4a02bbca94c409ab6dbbca1348cbb67298cd7fed8758761" dependencies = [ "gix-features", ] [[package]] name = "gix-glob" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1ddc03b04f2ef410e156c90d05080651e06f617a2d083030a5daff5e6fe0b88" +checksum = "d7c79b881a18d89a75876ba277476d5a2bad5b19f03759c7a07e0808dfe08212" dependencies = [ "bitflags 2.3.3", "bstr", @@ -592,9 +592,9 @@ dependencies = [ [[package]] name = "gix-hash" -version = "0.11.3" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0dd58cdbe7ffa4032fc111864c80d5f8cecd9a2c9736c97ae7e5be834188272" +checksum = "4b422ff2ad9a0628baaad6da468cf05385bf3f5ab495ad5a33cce99b9f41092f" dependencies = [ "hex", "thiserror", @@ -602,9 +602,9 @@ dependencies = [ [[package]] name = "gix-hashtable" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e133bc56d938eaec1c675af7c681a51de9662b0ada779f45607b967a10da77a" +checksum = "385f4ce6ecf3692d313ca3aa9bd3b3d8490de53368d6d94bedff3af8b6d9c58d" dependencies = [ "gix-hash", "hashbrown 0.14.0", @@ -613,9 +613,9 @@ dependencies = [ [[package]] name = "gix-ignore" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65ffd8e8860fd2eff53038101828fe8d19e5aad9dc869d9f1fbea825cf2830cf" +checksum = "a88b95ceb3bc45abcab6eb55ef4e0053e58b4df0712d3f9aec7d0ca990952603" dependencies = [ "bstr", "gix-glob", @@ -625,9 +625,9 @@ dependencies = [ [[package]] name = "gix-index" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e447ecb5c8365cdd1d8fe55d6cb047279657ef1747c4347755a4b64ff3b2f0d6" +checksum = "732f61ec71576bd443a3c24f4716dc7eac180d8929e7bb8603c7310161507106" dependencies = [ "bitflags 2.3.3", "bstr", @@ -635,6 +635,7 @@ dependencies = [ "filetime", "gix-bitmap", "gix-features", + "gix-fs", "gix-hash", "gix-lock", "gix-object", @@ -647,9 +648,9 @@ dependencies = [ [[package]] name = "gix-lock" -version = "7.0.1" +version = "7.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "714bcb13627995ac33716e9c5e4d25612b19947845395f64d2a9cbe6007728e4" +checksum = "7e82ec23c8a281f91044bf3ed126063b91b59f9c9340bf0ae746f385cc85a6fa" dependencies = [ "gix-tempfile", "gix-utils", @@ -658,9 +659,9 @@ dependencies = [ [[package]] name = "gix-mailmap" -version = "0.16.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe5a913fd8f56ea21cbd3b8bf813e0b410771682a065a14a4e9dede1012cd532" +checksum = "7fc0dbbf35d29639770af68d7ff55924d83786c8924b0e6a1766af1a98b7d58b" dependencies = [ "bstr", "gix-actor", @@ -670,9 +671,9 @@ dependencies = [ [[package]] name = "gix-negotiate" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "945302d90a0519a31acc42e7584d1e08156ef59b179e3bbf1fd9c0e40d819e64" +checksum = "ce0061b7ae867e830c77b1ecfc5875f0d042aebb3d7e6014d04fd86ca6c71d59" dependencies = [ "bitflags 2.3.3", "gix-commitgraph", @@ -686,9 +687,9 @@ dependencies = [ [[package]] name = "gix-object" -version = "0.33.0" +version = "0.33.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf32d43ccbeb9f2f54a74ee0a4b6a37143b0ba18a22288f4b790869cce232c46" +checksum = "70f18b688854af4440695b943e705877f94171325b8bcacaee2d898ecf2766d2" dependencies = [ "bstr", "btoi", @@ -706,9 +707,9 @@ dependencies = [ [[package]] name = "gix-odb" -version = "0.50.0" +version = "0.50.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "892c87273faa345ea12438c4ce2b89be15ae4abfda383035b8a3950965327d97" +checksum = "7dc2129d25313b594adfb5a71f2a617aaa2c3c4cfd3b2943823692db12fbc1db" dependencies = [ "arc-swap", "gix-date", @@ -725,9 +726,9 @@ dependencies = [ [[package]] name = "gix-pack" -version = "0.40.0" +version = "0.40.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3163c2bdbb1ec45a717b5bbab69d715b2a5711c19f91f9a3045c6f805cc59c83" +checksum = "4805d23741f5c3642332a665d4fbfa15ffe666e6252d6a72f0923c506dc35eb8" dependencies = [ "clru", "gix-chunk", @@ -747,9 +748,9 @@ dependencies = [ [[package]] name = "gix-packetline-blocking" -version = "0.16.3" +version = "0.16.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aef45b51fba629b588c3c50b57c815edebd5dddf7daa33736c33f160f9a64f34" +checksum = "20276373def40fc3be7a86d09e1bb607d33dd6bf83e3504e83cd594e51438667" dependencies = [ "bstr", "hex", @@ -758,9 +759,9 @@ dependencies = [ [[package]] name = "gix-path" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfca182d2575ded2ed38280f1ebf75cd5d3790b77e0872de07854cf085821fbe" +checksum = "18609c8cbec8508ea97c64938c33cd305b75dfc04a78d0c3b78b8b3fd618a77c" dependencies = [ "bstr", "gix-trace", @@ -771,9 +772,9 @@ dependencies = [ [[package]] name = "gix-prompt" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abe84674ac2473f98dea1832f727ddb16acbff3262dbf226f0a9be188b9a922b" +checksum = "2f755e8eb83ee9a06642a8fbd3009b033db2b5bd774f3aaf3de0b07f9b6ebdc5" dependencies = [ "gix-command", "gix-config-value", @@ -784,9 +785,9 @@ dependencies = [ [[package]] name = "gix-quote" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3874de636c2526de26a3405b8024b23ef1a327bebf4845d770d00d48700b6a40" +checksum = "dfd80d3d0c733508df9449b1d3795da36083807e31d851d7d61d29af13bd4b0a" dependencies = [ "bstr", "btoi", @@ -795,9 +796,9 @@ dependencies = [ [[package]] name = "gix-ref" -version = "0.33.0" +version = "0.33.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e368f5368279e97148a6214ec534bfebd1f29a0fe344947d92f488397bb27a08" +checksum = "d564f1cc4c5074b84d6cdd260862f9095775c07c93656e4ae67bd5bfa0b091fe" dependencies = [ "gix-actor", "gix-date", @@ -816,9 +817,9 @@ dependencies = [ [[package]] name = "gix-refspec" -version = "0.14.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df521f8fc9cbd82d9abb01b8047b653de1e58c9b4b919d63218d7da2a9cd91d7" +checksum = "d19a02bf740b326d6c082a7d6f754ebe56eef900986c5e91be7cf000df9ea18d" dependencies = [ "bstr", "gix-hash", @@ -830,9 +831,9 @@ dependencies = [ [[package]] name = "gix-revision" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1503e94badcbb9d8dc6ea3063522798913ead8f37f564f2cc335eff572208178" +checksum = "38a13500890435e3b9e7746bceda248646bfc69e259210884c98e29bb7a1aa6f" dependencies = [ "bstr", "gix-date", @@ -845,9 +846,9 @@ dependencies = [ [[package]] name = "gix-revwalk" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f43049c861d0de876d9022f61fddca4081f17c51d4dc5f7541621a076cb3218" +checksum = "71d4cbaf3cfbfde2b81b5ee8b469aff42c34693ce0fe17fc3c244d5085307f2c" dependencies = [ "gix-commitgraph", "gix-date", @@ -860,9 +861,9 @@ dependencies = [ [[package]] name = "gix-sec" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ede298863db2a0574a14070991710551e76d1f47c9783b62d4fcbca17f56371c" +checksum = "9615cbd6b456898aeb942cd75e5810c382fbfc48dbbff2fa23ebd2d33dcbe9c7" dependencies = [ "bitflags 2.3.3", "gix-path", @@ -872,9 +873,9 @@ dependencies = [ [[package]] name = "gix-tempfile" -version = "7.0.1" +version = "7.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce3aa96fec73f19aeec8f46c71bf3c00dd82e0668558930b3b914c0d98dabd65" +checksum = "fa28d567848cec8fdd77d36ad4f5f78ecfaba7d78f647d4f63c8ae1a2cec7243" dependencies = [ "gix-fs", "libc", @@ -887,15 +888,15 @@ dependencies = [ [[package]] name = "gix-trace" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "103eac621617be3ebe0605c9065ca51a223279a23218aaf67d10daa6e452f663" +checksum = "96b6d623a1152c3facb79067d6e2ecdae48130030cf27d6eb21109f13bd7b836" [[package]] name = "gix-traverse" -version = "0.30.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be19057a9ddef95af02d32b8b8d953cf974c4d378918e5e97d7345b843e0c271" +checksum = "e12e0fe428394226c37dd686ad64b09a04b569fe157d638b125b4a4c1e7e2df0" dependencies = [ "gix-commitgraph", "gix-date", @@ -909,9 +910,9 @@ dependencies = [ [[package]] name = "gix-url" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "092d3f8f4040ee1b82830224e9002fff69248348af27dfdbcc8536db80283945" +checksum = "4411bdbd1d46b35ae50e84c191660d437f89974e4236627785024be0b577170a" dependencies = [ "bstr", "gix-features", @@ -923,18 +924,18 @@ dependencies = [ [[package]] name = "gix-utils" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7058c94f4164fcf5b8457d35f6d8f6e1007f9f7f938c9c7684a7e01d23c6ddde" +checksum = "b85d89dc728613e26e0ed952a19583744e7f5240fcd4aa30d6c824ffd8b52f0f" dependencies = [ "fastrand", ] [[package]] name = "gix-validate" -version = "0.7.6" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d092b594c8af00a3a31fe526d363ee8a51a6f29d8496cdb991ed2f01ec0ec13" +checksum = "ba9b3737b2cef3dcd014633485f0034b0f1a931ee54aeb7d8f87f177f3c89040" dependencies = [ "bstr", "thiserror", @@ -942,9 +943,9 @@ dependencies = [ [[package]] name = "gix-worktree" -version = "0.22.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07b773e8e249c13fce5757b15e2620078adfec9dcfbfc7d243fbabf5bb49f121" +checksum = "8fd60b32d15287aef77e4fb1955627e0db1f13e40bf9a3481100223a51791f5f" dependencies = [ "bstr", "filetime", @@ -1172,9 +1173,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" dependencies = [ "autocfg", ] @@ -1465,9 +1466,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "syn" -version = "2.0.26" +version = "2.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45c3457aacde3c65315de5031ec191ce46604304d2446e803d71ade03308d970" +checksum = "b60f673f44a8255b9c8c657daf66a596d435f2da81a555b06dc644d080ba45e0" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 29353193..f45af1c5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,7 +34,7 @@ clap = { version = "~4.3", default-features = false, features = [ ctrlc = "3.4" encoding_rs = "0.8" flate2 = "1" -gix = { version = "0.49", default-features = false, features = [] } +gix = { version = "0.50", default-features = false, features = [] } indexmap = "2.0" is-terminal = "0.4" nom = { version = "7", default_features = false, features = [ "std" ] } diff --git a/src/stack/state.rs b/src/stack/state.rs index cd4a0dd0..d607c259 100644 --- a/src/stack/state.rs +++ b/src/stack/state.rs @@ -116,7 +116,8 @@ impl<'repo> StackState<'repo> { /// Read and parse stack state from given stack state tree. pub(super) fn from_tree(repo: &'repo gix::Repository, tree: gix::Tree<'repo>) -> Result { - let stack_json = tree.lookup_entry_by_path("stack.json")?; + let mut tree = tree; + let stack_json = tree.peel_to_entry_by_path("stack.json")?; if let Some(stack_json) = stack_json { let stack_json_blob = stack_json.object()?.peel_to_kind(gix::objs::Kind::Blob)?; let raw_state = RawStackState::from_stack_json(&stack_json_blob.data)?; @@ -323,9 +324,9 @@ impl<'repo> StackState<'repo> { let patches_tree_name = "patches"; let (prev_state, prev_patches_tree) = - if let Some((prev_state, prev_tree)) = prev_state_and_tree { + if let Some((prev_state, mut prev_tree)) = prev_state_and_tree { let prev_patches_tree = prev_tree - .lookup_entry_by_path(patches_tree_name)? + .peel_to_entry_by_path(patches_tree_name)? .and_then(|entry| entry.object().ok().map(|object| object.into_tree())); (Some(prev_state), prev_patches_tree) } else { @@ -397,7 +398,7 @@ impl<'repo> StackState<'repo> { .find(|entry_ref| entry_ref.filename() == patchname_str.as_bytes()) { if matches!(prev_patch_entry.mode(), gix::objs::tree::EntryMode::Blob) { - return Ok(prev_patch_entry.oid()); + return Ok(prev_patch_entry.object_id()); } } } diff --git a/src/stack/upgrade.rs b/src/stack/upgrade.rs index a0d42188..f3c85e8c 100644 --- a/src/stack/upgrade.rs +++ b/src/stack/upgrade.rs @@ -52,10 +52,10 @@ fn get_format_version(repo: &gix::Repository, branch_name: &str) -> Result .context("finding version 4 state commit")? .object()? .try_into_commit()?; - let state_tree = state_commit + let mut state_tree = state_commit .tree() .context("finding version 4 state tree")?; - if let Some(meta_entry) = state_tree.lookup_entry_by_path("meta")? { + if let Some(meta_entry) = state_tree.peel_to_entry_by_path("meta")? { let meta_blob = meta_entry .object() .context("finding old stack `meta` blob") @@ -99,10 +99,10 @@ fn stack_upgrade_from_4(repo: &gix::Repository, branch_name: &str) -> Result<()> .context("finding version 4 state commit")? .object()? .try_into_commit()?; - let state_tree = state_commit + let mut state_tree = state_commit .tree() .context("finding version 4 state tree")?; - if let Some(meta_entry) = state_tree.lookup_entry_by_path("meta")? { + if let Some(meta_entry) = state_tree.peel_to_entry_by_path("meta")? { let meta_blob = meta_entry .object() .context("finding old stack `meta` blob")