From bcbe0f110dd0d360f968da6501c27991d25be9bc Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 4 Jul 2023 22:38:30 +0000 Subject: [PATCH 01/27] build(deps): update rust crate serde_json to 1.0.100 --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3e7c20acf..12a75cff7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2708,9 +2708,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.99" +version = "1.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46266871c240a00b8f503b877622fe33430b3c7d963bdc0f2adc511e54a1eae3" +checksum = "0f1e14e89be7aa4c4b78bdbdc9eb5bf8517829a600ae8eaa39a6e1d960b5185c" dependencies = [ "itoa", "ryu", diff --git a/Cargo.toml b/Cargo.toml index 7bfce096c..ffaac3a7e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -71,7 +71,7 @@ regex = { version = "1.8.4", default-features = false, features = ["perf", "std" rust-ini = "0.19.0" semver = "1.0.17" serde = { version = "1.0.166", features = ["derive"] } -serde_json = "1.0.99" +serde_json = "1.0.100" sha1 = "0.10.5" shadow-rs = { version = "0.23.0", default-features = false } # battery is optional (on by default) because the crate doesn't currently build for Termux From 55c6cb76e5bb68c0c6d7ea5c9c7c9215e3fd953b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 5 Jul 2023 16:52:51 +0000 Subject: [PATCH 02/27] build(deps): update clap crates --- Cargo.lock | 12 ++++++------ Cargo.toml | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 12a75cff7..1a643d751 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -369,9 +369,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.3.10" +version = "4.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "384e169cc618c613d5e3ca6404dda77a8685a63e08660dcc64abaf7da7cb0c7a" +checksum = "1640e5cc7fb47dbb8338fd471b105e7ed6c3cb2aeb00c2e067127ffd3764a05d" dependencies = [ "clap_builder", "clap_derive", @@ -380,9 +380,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.3.10" +version = "4.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef137bbe35aab78bdb468ccfba75a5f4d8321ae011d34063770780545176af2d" +checksum = "98c59138d527eeaf9b53f35a77fcc1fad9d883116070c63d5de1c7dc7b00c72b" dependencies = [ "anstream", "anstyle", @@ -395,9 +395,9 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.3.1" +version = "4.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f6b5c519bab3ea61843a7923d074b04245624bb84a64a8c150f5deb014e388b" +checksum = "5fc443334c81a804575546c5a8a79b4913b50e28d69232903604cada1de817ce" dependencies = [ "clap", ] diff --git a/Cargo.toml b/Cargo.toml index ffaac3a7e..e19fcd58c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,8 +43,8 @@ gix-faster = ["gix-features/zlib-stock", "gix/fast-sha1"] [dependencies] chrono = { version = "0.4.26", default-features = false, features = ["clock", "std", "wasmbind"] } -clap = { version = "4.3.10", features = ["derive", "cargo", "unicode"] } -clap_complete = "4.3.1" +clap = { version = "4.3.11", features = ["derive", "cargo", "unicode"] } +clap_complete = "4.3.2" dirs-next = "2.0.0" dunce = "1.0.4" gethostname = "0.4.3" From fce972f17ae7c284fbf7e5b6f7c36030c71f83bc Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 5 Jul 2023 16:53:15 +0000 Subject: [PATCH 03/27] build(deps): update rust crate regex to 1.9.0 --- Cargo.lock | 24 ++++++++++++++++++------ Cargo.toml | 2 +- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1a643d751..e8344ee51 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -310,7 +310,7 @@ checksum = "a246e68bb43f6cd9db24bea052a53e40405417c5fb372e3d1a8a7f770a564ef5" dependencies = [ "memchr", "once_cell", - "regex-automata", + "regex-automata 0.1.10", "serde", ] @@ -2547,12 +2547,13 @@ dependencies = [ [[package]] name = "regex" -version = "1.8.4" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0ab3ca65655bb1e41f2a8c8cd662eb4fb035e67c3f78da1d61dffe89d07300f" +checksum = "89089e897c013b3deb627116ae56a6955a72b8bed395c9526af31c9fe528b484" dependencies = [ "aho-corasick", "memchr", + "regex-automata 0.3.0", "regex-syntax", ] @@ -2563,10 +2564,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" [[package]] -name = "regex-syntax" -version = "0.7.2" +name = "regex-automata" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" +checksum = "fa250384981ea14565685dea16a9ccc4d1c541a13f82b9c168572264d1df8c56" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ab07dc67230e4a4718e70fd5c20055a4334b121f1f9db8fe63ef39ce9b8c846" [[package]] name = "rust-ini" diff --git a/Cargo.toml b/Cargo.toml index e19fcd58c..27d796022 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -67,7 +67,7 @@ pest_derive = "2.7.0" quick-xml = "0.29.0" rand = "0.8.5" rayon = "1.7.0" -regex = { version = "1.8.4", default-features = false, features = ["perf", "std", "unicode-perl"] } +regex = { version = "1.9.0", default-features = false, features = ["perf", "std", "unicode-perl"] } rust-ini = "0.19.0" semver = "1.0.17" serde = { version = "1.0.166", features = ["derive"] } From 35241bad9257ae4dae50e6717a083b5388e73e73 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 5 Jul 2023 22:46:12 +0000 Subject: [PATCH 04/27] build(deps): update toml crates --- Cargo.lock | 10 +++++----- Cargo.toml | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e8344ee51..f857517c4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2932,7 +2932,7 @@ dependencies = [ "systemstat", "tempfile", "terminal_size", - "toml 0.7.5", + "toml 0.7.6", "toml_edit", "unicode-segmentation", "unicode-width", @@ -3187,9 +3187,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ebafdf5ad1220cb59e7d17cf4d2c72015297b75b19a10472f99b89225089240" +checksum = "c17e963a819c331dcacd7ab957d80bc2b9a9c1e71c804826d2f283dd65306542" dependencies = [ "indexmap 2.0.0", "serde", @@ -3209,9 +3209,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.19.11" +version = "0.19.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266f016b7f039eec8a1a80dfe6156b633d208b9fccca5e4db1d6775b0c4e34a7" +checksum = "c500344a19072298cd05a7224b3c0c629348b78692bf48466c5238656e315a78" dependencies = [ "indexmap 2.0.0", "serde", diff --git a/Cargo.toml b/Cargo.toml index 27d796022..7b07ebd9e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -80,8 +80,8 @@ starship-battery = { version = "0.8.1", optional = true } strsim = "0.10.0" systemstat = "=0.2.3" terminal_size = "0.2.6" -toml = { version = "0.7.5", features = ["preserve_order"] } -toml_edit = "0.19.11" +toml = { version = "0.7.6", features = ["preserve_order"] } +toml_edit = "0.19.12" unicode-segmentation = "1.10.1" unicode-width = "0.1.10" urlencoding = "2.1.2" From b9a4b08ac24805061c5faaef98ccbee7b018f5f0 Mon Sep 17 00:00:00 2001 From: David Knaack Date: Thu, 6 Jul 2023 11:32:17 +0200 Subject: [PATCH 05/27] fix(rprompt): remove lprompt modules from `$all` again (#5067) --- src/print.rs | 132 ++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 95 insertions(+), 37 deletions(-) diff --git a/src/print.rs b/src/print.rs index 027e4e8f7..742dfdb98 100644 --- a/src/print.rs +++ b/src/print.rs @@ -12,7 +12,6 @@ use unicode_width::UnicodeWidthChar; use crate::configs::PROMPT_ORDER; use crate::context::{Context, Properties, Shell, Target}; -use crate::formatter::string_formatter::StringFormatterError; use crate::formatter::{StringFormatter, VariableHolder}; use crate::module::Module; use crate::module::ALL_MODULES; @@ -405,43 +404,65 @@ fn all_modules_uniq(module_list: &BTreeSet) -> Vec { /// and the list of all modules used in a format string fn load_formatter_and_modules<'a>(context: &'a Context) -> (StringFormatter<'a>, BTreeSet) { let config = &context.root_config; - let (formatter, config_param) = match &context.target { - Target::Main => (StringFormatter::new(&config.format), "format".to_string()), - Target::Right => ( - StringFormatter::new(&config.right_format), - "right_format".to_string(), - ), - Target::Continuation => ( - StringFormatter::new(&config.continuation_prompt), - "continuation_prompt".to_string(), - ), - Target::Profile(name) => ( - match config.profiles.get(name) { - Some(format) => StringFormatter::new(format), - _ => Err(StringFormatterError::Custom("Invalid Profile".to_string())), - }, - format!("profile: {}", &name), - ), + + if context.target == Target::Continuation { + let cf = &config.continuation_prompt; + let formatter = StringFormatter::new(cf); + return match formatter { + Ok(f) => { + let modules = f.get_variables().into_iter().collect(); + (f, modules) + } + Err(e) => { + log::error!("Error parsing continuation prompt: {e}"); + (StringFormatter::raw(">"), BTreeSet::new()) + } + }; + } + + let (left_format_str, right_format_str): (&str, &str) = match context.target { + Target::Main | Target::Right => (&config.format, &config.right_format), + Target::Profile(ref name) => { + if let Some(lf) = config.profiles.get(name) { + (lf, "") + } else { + log::error!("Profile {name:?} not found"); + return (StringFormatter::raw(">"), BTreeSet::new()); + } + } + Target::Continuation => unreachable!("Continuation prompt should have been handled above"), }; - let rformatter = StringFormatter::new(&config.right_format); + let lf = StringFormatter::new(left_format_str); + let rf = StringFormatter::new(right_format_str); - if formatter.is_err() { - log::error!("Error parsing `{}`", config_param); - } - if rformatter.is_err() { - log::error!("Error parsing `right_format`") + if let Err(ref e) = lf { + let name = if let Target::Profile(ref profile_name) = context.target { + format!("profile.{profile_name}") + } else { + "format".to_string() + }; + log::error!("Error parsing {name:?}: {e}"); + }; + + if let Err(ref e) = rf { + log::error!("Error parsing right_format: {e}"); } - match (formatter, rformatter) { - (Ok(lf), Ok(rf)) => { - let mut modules: BTreeSet = BTreeSet::new(); - if context.target != Target::Continuation { - modules.extend(lf.get_variables()); - modules.extend(rf.get_variables()); - } - (lf, modules) - } + let modules = [&lf, &rf] + .into_iter() + .flatten() + .flat_map(|f| f.get_variables()) + .collect(); + + let main_formatter = match context.target { + Target::Main | Target::Profile(_) => lf, + Target::Right => rf, + Target::Continuation => unreachable!("Continuation prompt should have been handled above"), + }; + + match main_formatter { + Ok(f) => (f, modules), _ => (StringFormatter::raw(">"), BTreeSet::new()), } } @@ -526,13 +547,50 @@ mod test { } #[test] - fn custom_prompt() { + fn prompt_with_all() -> io::Result<()> { let mut context = default_context().set_config(toml::toml! { add_newline = false - [profiles] - test="0_0$character" + right_format= "$directory$line_break" + format="$all" [character] - format=">>" + format=">" + }); + let dir = tempfile::tempdir().unwrap(); + context.current_dir = dir.path().to_path_buf(); + + let expected = String::from(">"); + let actual = get_prompt(context); + assert_eq!(expected, actual); + dir.close() + } + + #[test] + fn rprompt_with_all() -> io::Result<()> { + let mut context = default_context().set_config(toml::toml! { + format= "$directory$line_break" + right_format="$all" + [character] + format=">" + }); + let dir = tempfile::tempdir().unwrap(); + context.current_dir = dir.path().to_path_buf(); + + context.target = Target::Right; + + let expected = String::from(">"); + let actual = get_prompt(context); + assert_eq!(expected, actual); + dir.close() + } + + #[test] + fn custom_prompt() { + let mut context = default_context().set_config(toml::toml! { + add_newline = false + [profiles] + test="0_0$character" + [character] + format=">>" }); context.target = Target::Profile("test".to_string()); From b9cba7072324fdfb4db3e1537efcf520a87ea315 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 7 Jul 2023 02:36:52 +0000 Subject: [PATCH 06/27] build(deps): update rust crate serde to 1.0.167 --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f857517c4..c7e5bbf9d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2689,18 +2689,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.166" +version = "1.0.167" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d01b7404f9d441d3ad40e6a636a7782c377d2abdbe4fa2440e2edcc2f4f10db8" +checksum = "7daf513456463b42aa1d94cff7e0c24d682b429f020b9afa4f5ba5c40a22b237" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.166" +version = "1.0.167" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dd83d6dde2b6b2d466e14d9d1acce8816dedee94f735eac6395808b3483c6d6" +checksum = "b69b106b68bc8054f0e974e70d19984040f8a5cf9215ca82626ea4853f82c4b9" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 7b07ebd9e..e9831f921 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -70,7 +70,7 @@ rayon = "1.7.0" regex = { version = "1.9.0", default-features = false, features = ["perf", "std", "unicode-perl"] } rust-ini = "0.19.0" semver = "1.0.17" -serde = { version = "1.0.166", features = ["derive"] } +serde = { version = "1.0.167", features = ["derive"] } serde_json = "1.0.100" sha1 = "0.10.5" shadow-rs = { version = "0.23.0", default-features = false } From 93a21042a61186ce19b25e62e580c64b9bbcd5d1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 7 Jul 2023 18:33:10 +0000 Subject: [PATCH 07/27] build(deps): update rust crate regex to 1.9.1 --- Cargo.lock | 10 +++++----- Cargo.toml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c7e5bbf9d..bba148539 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2547,13 +2547,13 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.0" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89089e897c013b3deb627116ae56a6955a72b8bed395c9526af31c9fe528b484" +checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.3.0", + "regex-automata 0.3.1", "regex-syntax", ] @@ -2565,9 +2565,9 @@ checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" [[package]] name = "regex-automata" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa250384981ea14565685dea16a9ccc4d1c541a13f82b9c168572264d1df8c56" +checksum = "e9aaecc05d5c4b5f7da074b9a0d1a0867e71fd36e7fc0482d8bcfe8e8fc56290" dependencies = [ "aho-corasick", "memchr", diff --git a/Cargo.toml b/Cargo.toml index e9831f921..b30d5f021 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -67,7 +67,7 @@ pest_derive = "2.7.0" quick-xml = "0.29.0" rand = "0.8.5" rayon = "1.7.0" -regex = { version = "1.9.0", default-features = false, features = ["perf", "std", "unicode-perl"] } +regex = { version = "1.9.1", default-features = false, features = ["perf", "std", "unicode-perl"] } rust-ini = "0.19.0" semver = "1.0.17" serde = { version = "1.0.167", features = ["derive"] } From b34d3169e4f332061281a9a3acfd54547974ed94 Mon Sep 17 00:00:00 2001 From: Matan Kushner Date: Fri, 7 Jul 2023 18:20:43 -0700 Subject: [PATCH 08/27] chore: remove Snapcraft starship distribution (#5296) --- README.md | 2 -- snapcraft.yaml | 91 -------------------------------------------------- 2 files changed, 93 deletions(-) delete mode 100644 snapcraft.yaml diff --git a/README.md b/README.md index de6ce0b75..bd9423b8c 100644 --- a/README.md +++ b/README.md @@ -223,7 +223,6 @@ Alternatively, install Starship using any of the following package managers: | **_Any_** | **[crates.io]** | `cargo install starship --locked` | | _Any_ | [conda-forge] | `conda install -c conda-forge starship` | | _Any_ | [Linuxbrew] | `brew install starship` | -| _Any_ | [Snapcraft] | `snap install --edge starship` | | Alpine Linux 3.13+ | [Alpine Linux Packages] | `apk add starship` | | Arch Linux | [Arch Linux Extra] | `pacman -S starship` | | CentOS 7+ | [Copr] | `dnf copr enable atim/starship`
`dnf install starship` | @@ -458,7 +457,6 @@ This project is [ISC](https://github.com/starship/starship/blob/master/LICENSE) [nixpkgs]: https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix [pkgsrc]: https://pkgsrc.se/shells/starship [scoop]: https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json -[snapcraft]: https://snapcraft.io/starship [termux]: https://github.com/termux/termux-packages/tree/master/packages/starship [void linux packages]: https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship [winget]: https://github.com/microsoft/winget-pkgs/tree/master/manifests/s/Starship/Starship diff --git a/snapcraft.yaml b/snapcraft.yaml deleted file mode 100644 index 13b0be2c8..000000000 --- a/snapcraft.yaml +++ /dev/null @@ -1,91 +0,0 @@ -name: starship -base: core20 -adopt-info: starship -summary: The minimal, blazing-fast, and infinitely customizable prompt for any shell! -description: | - Starship is the minimal, blazing fast, and extremely customizable prompt - for any shell! The prompt shows information you need while you're working, - while staying sleek and out of the way. - - ## Prerequisites - - A Powerline font installed and enabled in your terminal (for example, try Fira Code). - * https://github.com/powerline/fonts - * https://github.com/tonsky/FiraCode - - ## Getting Started - - Add the init script to your shell's config file: - ### Bash - - Add the following to the end of ~/.bashrc: - - `eval "$(starship init bash)"` - - ### Fish - - Add the following to the end of ~/.config/fish/config.fish: - - # ~/.config/fish/config.fish - - starship init fish | source - - ### Zsh - - Add the following to the end of ~/.zshrc: - - eval "$(starship init zsh)" - - ### Powershell - - Add the following to the end of ~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1 (or ~/.config/powershell/Microsoft.PowerShell_profile.ps1 on -Nix): - - `Invoke-Expression (&starship init powershell)` - - ### Xonsh - - Add the following to the end of ~/.xonshrc: - - execx($(starship init xonsh)) - -grade: stable -confinement: strict - -parts: - starship: - plugin: rust - source: https://github.com/starship/starship.git - #source-tag: v$SNAPCRAFT_PROJECT_VERSION - build-packages: - - cmake - - pkg-config - override-build: | - last_committed_tag="$(git describe --tags --abbrev=0)" - last_committed_tag_ver="$(echo ${last_committed_tag} | sed 's/v//')" - last_released_tag="$(snap info $SNAPCRAFT_PROJECT_NAME | awk '$1 == "beta:" { print $2 }')" - # If the latest tag from the upstream project has not been released to - # beta, build that tag instead of master. - if [ "${last_committed_tag_ver}" != "${last_released_tag}" ]; then - git fetch - git checkout "${last_committed_tag}" - cd ../src - git checkout "${last_committed_tag}" - fi - snapcraftctl build - snapcraftctl set-version $(git -C ../src describe --tags | sed 's/v//') - -apps: - starship: - command: bin/starship - plugs: - - home - - removable-media - - personal-files - -architectures: - - build-on: amd64 - - build-on: arm64 - - build-on: armhf - - build-on: i386 - - build-on: ppc64el - - build-on: s390x From 1aaf0412e6239a6a1d82c6d6af5feb412a3b0c63 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 9 Jul 2023 04:49:37 +0000 Subject: [PATCH 09/27] build(deps): update rust crate serde to 1.0.169 --- Cargo.lock | 34 +++++++++++++++++----------------- Cargo.toml | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bba148539..fe105f5c1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -213,7 +213,7 @@ checksum = "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.24", ] [[package]] @@ -230,7 +230,7 @@ checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.24", ] [[package]] @@ -411,7 +411,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.24", ] [[package]] @@ -751,7 +751,7 @@ checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.24", ] [[package]] @@ -2272,7 +2272,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.24", ] [[package]] @@ -2689,22 +2689,22 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.167" +version = "1.0.169" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7daf513456463b42aa1d94cff7e0c24d682b429f020b9afa4f5ba5c40a22b237" +checksum = "bd51c3db8f9500d531e6c12dd0fd4ad13d133e9117f5aebac3cdbb8b6d9824b0" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.167" +version = "1.0.169" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b69b106b68bc8054f0e974e70d19984040f8a5cf9215ca82626ea4853f82c4b9" +checksum = "27738cfea0d944ab72c3ed01f3d5f23ec4322af8a1431e40ce630e4c01ea74fd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.24", ] [[package]] @@ -2737,7 +2737,7 @@ checksum = "bcec881020c684085e55a25f7fd888954d56609ef363479dc5a1305eb0d40cab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.24", ] [[package]] @@ -2986,9 +2986,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.22" +version = "2.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2efbeae7acf4eabd6bcdcbd11c92f45231ddda7539edc7806bd1a04a03b24616" +checksum = "36ccaf716a23c35ff908f91c971a86a9a71af5998c1d8f10e828d9f55f68ac00" dependencies = [ "proc-macro2", "quote", @@ -3120,7 +3120,7 @@ checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.24", ] [[package]] @@ -3240,7 +3240,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.24", ] [[package]] @@ -3444,7 +3444,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.24", "wasm-bindgen-shared", ] @@ -3466,7 +3466,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.24", "wasm-bindgen-backend", "wasm-bindgen-shared", ] diff --git a/Cargo.toml b/Cargo.toml index b30d5f021..848cd7b38 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -70,7 +70,7 @@ rayon = "1.7.0" regex = { version = "1.9.1", default-features = false, features = ["perf", "std", "unicode-perl"] } rust-ini = "0.19.0" semver = "1.0.17" -serde = { version = "1.0.167", features = ["derive"] } +serde = { version = "1.0.169", features = ["derive"] } serde_json = "1.0.100" sha1 = "0.10.5" shadow-rs = { version = "0.23.0", default-features = false } From 7313848e0754ae98836144fc278119b93f9dfef9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 10 Jul 2023 03:43:00 +0000 Subject: [PATCH 10/27] build(deps): update rust crate serde to 1.0.171 --- Cargo.lock | 34 +++++++++++++++++----------------- Cargo.toml | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fe105f5c1..60802f4a4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -213,7 +213,7 @@ checksum = "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba" dependencies = [ "proc-macro2", "quote", - "syn 2.0.24", + "syn 2.0.25", ] [[package]] @@ -230,7 +230,7 @@ checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" dependencies = [ "proc-macro2", "quote", - "syn 2.0.24", + "syn 2.0.25", ] [[package]] @@ -411,7 +411,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.24", + "syn 2.0.25", ] [[package]] @@ -751,7 +751,7 @@ checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" dependencies = [ "proc-macro2", "quote", - "syn 2.0.24", + "syn 2.0.25", ] [[package]] @@ -2272,7 +2272,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.24", + "syn 2.0.25", ] [[package]] @@ -2689,22 +2689,22 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.169" +version = "1.0.171" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd51c3db8f9500d531e6c12dd0fd4ad13d133e9117f5aebac3cdbb8b6d9824b0" +checksum = "30e27d1e4fd7659406c492fd6cfaf2066ba8773de45ca75e855590f856dc34a9" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.169" +version = "1.0.171" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27738cfea0d944ab72c3ed01f3d5f23ec4322af8a1431e40ce630e4c01ea74fd" +checksum = "389894603bd18c46fa56231694f8d827779c0951a667087194cf9de94ed24682" dependencies = [ "proc-macro2", "quote", - "syn 2.0.24", + "syn 2.0.25", ] [[package]] @@ -2737,7 +2737,7 @@ checksum = "bcec881020c684085e55a25f7fd888954d56609ef363479dc5a1305eb0d40cab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.24", + "syn 2.0.25", ] [[package]] @@ -2986,9 +2986,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.24" +version = "2.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36ccaf716a23c35ff908f91c971a86a9a71af5998c1d8f10e828d9f55f68ac00" +checksum = "15e3fc8c0c74267e2df136e5e5fb656a464158aa57624053375eb9c8c6e25ae2" dependencies = [ "proc-macro2", "quote", @@ -3120,7 +3120,7 @@ checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.24", + "syn 2.0.25", ] [[package]] @@ -3240,7 +3240,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.24", + "syn 2.0.25", ] [[package]] @@ -3444,7 +3444,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.24", + "syn 2.0.25", "wasm-bindgen-shared", ] @@ -3466,7 +3466,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.24", + "syn 2.0.25", "wasm-bindgen-backend", "wasm-bindgen-shared", ] diff --git a/Cargo.toml b/Cargo.toml index 848cd7b38..d5e086a4f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -70,7 +70,7 @@ rayon = "1.7.0" regex = { version = "1.9.1", default-features = false, features = ["perf", "std", "unicode-perl"] } rust-ini = "0.19.0" semver = "1.0.17" -serde = { version = "1.0.169", features = ["derive"] } +serde = { version = "1.0.171", features = ["derive"] } serde_json = "1.0.100" sha1 = "0.10.5" shadow-rs = { version = "0.23.0", default-features = false } From c0fee510d8b937899da8a58480e49e02f481d64c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 10 Jul 2023 16:55:09 +0000 Subject: [PATCH 11/27] build(deps): update crate-ci/typos action to v1.16.0 --- .github/workflows/spell-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/spell-check.yml b/.github/workflows/spell-check.yml index 248d980bf..a52b205e5 100644 --- a/.github/workflows/spell-check.yml +++ b/.github/workflows/spell-check.yml @@ -7,4 +7,4 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: crate-ci/typos@v1.15.10 + - uses: crate-ci/typos@v1.16.0 From 9bbc7b469ddb7b948bcc44ab8813fcf4ba01631f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 10 Jul 2023 19:48:30 +0000 Subject: [PATCH 12/27] build(deps): update dependency taplo-cli to 0.8.1 --- .github/workflows/format-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/format-workflow.yml b/.github/workflows/format-workflow.yml index db8ce40af..b8f651e9b 100644 --- a/.github/workflows/format-workflow.yml +++ b/.github/workflows/format-workflow.yml @@ -24,7 +24,7 @@ jobs: - name: Setup | Checkout uses: actions/checkout@v3 - name: Install | Taplo - run: cargo install --debug --locked --version 0.8.0 taplo-cli + run: cargo install --debug --locked --version 0.8.1 taplo-cli - name: Presets | Validate with schema run: taplo lint --schema "file://${GITHUB_WORKSPACE}/.github/config-schema.json" docs/.vuepress/public/presets/toml/*.toml From 410f107c722a2f07737d4be01960f2621bf418dd Mon Sep 17 00:00:00 2001 From: David Knaack Date: Tue, 11 Jul 2023 11:26:50 +0200 Subject: [PATCH 13/27] perf(git_status): query git stash count via gitoxide (#5238) --- src/modules/git_status.rs | 80 ++++++++++++++++++++++++++++++++------- 1 file changed, 66 insertions(+), 14 deletions(-) diff --git a/src/modules/git_status.rs b/src/modules/git_status.rs index 451c1e074..dad848b63 100644 --- a/src/modules/git_status.rs +++ b/src/modules/git_status.rs @@ -244,18 +244,28 @@ fn get_repo_status(context: &Context, config: &GitStatusConfig) -> Option Option { - let stash_output = context.exec_cmd( - "git", - &[ - OsStr::new("-C"), - context.current_dir.as_os_str(), - OsStr::new("--no-optional-locks"), - OsStr::new("stash"), - OsStr::new("list"), - ], - )?; + let repo = context.get_repo().ok()?.open(); + let reference = match repo.try_find_reference("refs/stash") { + Ok(Some(reference)) => reference, + // No stash reference found + Ok(None) => return Some(0), + Err(err) => { + log::warn!("Error finding stash reference: {err}"); + return None; + } + }; - Some(stash_output.stdout.trim().lines().count()) + match reference.log_iter().all() { + Ok(Some(log)) => Some(log.count()), + Ok(None) => { + log::debug!("No reflog found for stash"); + Some(0) + } + Err(err) => { + log::warn!("Error getting stash log: {err}"); + None + } + } } #[derive(Default, Debug, Copy, Clone)] @@ -744,9 +754,38 @@ mod tests { .output()?; let actual = ModuleRenderer::new("git_status") + .config(toml::toml! { + [git_status] + format = "$stashed" + }) .path(repo_dir.path()) .collect(); - let expected = format_output("$"); + let expected = Some(String::from("$")); + + assert_eq!(expected, actual); + repo_dir.close() + } + + #[test] + fn shows_no_stashed_after_undo() -> io::Result<()> { + let repo_dir = fixture_repo(FixtureProvider::Git)?; + + create_stash(repo_dir.path())?; + undo_stash(repo_dir.path())?; + + create_command("git")? + .args(["reset", "--hard", "HEAD"]) + .current_dir(repo_dir.path()) + .output()?; + + let actual = ModuleRenderer::new("git_status") + .config(toml::toml! { + [git_status] + format = "$stashed" + }) + .path(repo_dir.path()) + .collect(); + let expected = None; assert_eq!(expected, actual); repo_dir.close() @@ -756,6 +795,9 @@ mod tests { fn shows_stashed_with_count() -> io::Result<()> { let repo_dir = fixture_repo(FixtureProvider::Git)?; + create_stash(repo_dir.path())?; + undo_stash(repo_dir.path())?; + create_stash(repo_dir.path())?; create_stash(repo_dir.path())?; create_command("git")? @@ -770,7 +812,7 @@ mod tests { }) .path(repo_dir.path()) .collect(); - let expected = format_output("$1"); + let expected = format_output("$2"); assert_eq!(expected, actual); repo_dir.close() @@ -1177,7 +1219,8 @@ mod tests { } fn create_stash(repo_dir: &Path) -> io::Result<()> { - File::create(repo_dir.join("readme.md"))?.sync_all()?; + let (file, _path) = tempfile::NamedTempFile::new_in(repo_dir)?.keep()?; + file.sync_all()?; create_command("git")? .args(["stash", "--all"]) @@ -1187,6 +1230,15 @@ mod tests { Ok(()) } + fn undo_stash(repo_dir: &Path) -> io::Result<()> { + create_command("git")? + .args(["stash", "pop"]) + .current_dir(repo_dir) + .output()?; + + Ok(()) + } + fn create_untracked(repo_dir: &Path) -> io::Result<()> { File::create(repo_dir.join("license"))?.sync_all()?; From daf17a06d64a1775518c739c477c1af0bffcff09 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 12 Jul 2023 00:34:50 +0000 Subject: [PATCH 14/27] build(deps): update rust crate serde_json to 1.0.102 --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 60802f4a4..57e41f96d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2720,9 +2720,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.100" +version = "1.0.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f1e14e89be7aa4c4b78bdbdc9eb5bf8517829a600ae8eaa39a6e1d960b5185c" +checksum = "b5062a995d481b2308b6064e9af76011f2921c35f97b0468811ed9f6cd91dfed" dependencies = [ "itoa", "ryu", diff --git a/Cargo.toml b/Cargo.toml index d5e086a4f..bafe6d5a4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -71,7 +71,7 @@ regex = { version = "1.9.1", default-features = false, features = ["perf", "std" rust-ini = "0.19.0" semver = "1.0.17" serde = { version = "1.0.171", features = ["derive"] } -serde_json = "1.0.100" +serde_json = "1.0.102" sha1 = "0.10.5" shadow-rs = { version = "0.23.0", default-features = false } # battery is optional (on by default) because the crate doesn't currently build for Termux From c5edb413dda475b8f4095f7fb9d0c84aea058a48 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 13 Jul 2023 23:19:10 +0000 Subject: [PATCH 15/27] build(deps): update rust crate toml_edit to 0.19.13 --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 57e41f96d..bb048c6a7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3209,9 +3209,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.19.12" +version = "0.19.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c500344a19072298cd05a7224b3c0c629348b78692bf48466c5238656e315a78" +checksum = "5f8751d9c1b03c6500c387e96f81f815a4f8e72d142d2d4a9ffa6fedd51ddee7" dependencies = [ "indexmap 2.0.0", "serde", @@ -3639,9 +3639,9 @@ checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" [[package]] name = "winnow" -version = "0.4.7" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca0ace3845f0d96209f0375e6d367e3eb87eb65d27d445bdc9f1843a26f39448" +checksum = "81fac9742fd1ad1bd9643b991319f72dd031016d44b77039a26977eb667141e7" dependencies = [ "memchr", ] diff --git a/Cargo.toml b/Cargo.toml index bafe6d5a4..fa859719e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -81,7 +81,7 @@ strsim = "0.10.0" systemstat = "=0.2.3" terminal_size = "0.2.6" toml = { version = "0.7.6", features = ["preserve_order"] } -toml_edit = "0.19.12" +toml_edit = "0.19.13" unicode-segmentation = "1.10.1" unicode-width = "0.1.10" urlencoding = "2.1.2" From 3402f0e82aab907a77f0967abb99d4cde512c069 Mon Sep 17 00:00:00 2001 From: Vivek Kushwaha Date: Fri, 14 Jul 2023 14:29:02 +0530 Subject: [PATCH 16/27] feat(shlvl): add repeat_offset for repeated symbol (#5289) Signed-off-by: Vivek Kushwaha --- .github/config-schema.json | 7 +++++++ docs/config/README.md | 33 +++++++++++++++++++++++-------- src/configs/shlvl.rs | 2 ++ src/modules/shlvl.rs | 40 +++++++++++++++++++++++++++++++++++++- 4 files changed, 73 insertions(+), 9 deletions(-) diff --git a/.github/config-schema.json b/.github/config-schema.json index 20e4fa3b6..98d6348ae 100644 --- a/.github/config-schema.json +++ b/.github/config-schema.json @@ -1499,6 +1499,7 @@ "disabled": true, "format": "[$symbol$shlvl]($style) ", "repeat": false, + "repeat_offset": 0, "style": "bold yellow", "symbol": "↕️ ", "threshold": 2 @@ -5243,6 +5244,12 @@ "default": false, "type": "boolean" }, + "repeat_offset": { + "default": 0, + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, "style": { "default": "bold yellow", "type": "string" diff --git a/docs/config/README.md b/docs/config/README.md index 5050631c9..47dbfdff3 100644 --- a/docs/config/README.md +++ b/docs/config/README.md @@ -3772,14 +3772,15 @@ set to a number and meets or exceeds the specified threshold. ### Options -| Option | Default | Description | -| ----------- | ---------------------------- | ------------------------------------------------------------- | -| `threshold` | `2` | Display threshold. | -| `format` | `'[$symbol$shlvl]($style) '` | The format for the module. | -| `symbol` | `'↕️ '` | The symbol used to represent the `SHLVL`. | -| `repeat` | `false` | Causes `symbol` to be repeated by the current `SHLVL` amount. | -| `style` | `'bold yellow'` | The style for the module. | -| `disabled` | `true` | Disables the `shlvl` module. | +| Option | Default | Description | +| --------------- | ---------------------------- | ------------------------------------------------------------------- | +| `threshold` | `2` | Display threshold. | +| `format` | `'[$symbol$shlvl]($style) '` | The format for the module. | +| `symbol` | `'↕️ '` | The symbol used to represent the `SHLVL`. | +| `repeat` | `false` | Causes `symbol` to be repeated by the current `SHLVL` amount. | +| `repeat_offset` | `0` | Decrements number of times `symbol` is repeated by the offset value | +| `style` | `'bold yellow'` | The style for the module. | +| `disabled` | `true` | Disables the `shlvl` module. | ### Variables @@ -3802,6 +3803,22 @@ format = '$shlvl level(s) down' threshold = 3 ``` +Using `repeat` and `repeat_offset` along with `character` module, one can get +prompt like `❯❯❯` where last character is colored appropriately for return +status code and preceeding characters are provided by `shlvl`. + +```toml +# ~/.config/starship.toml + +[shlvl] +disabled = false +format = '[$symbol$shlvl]($style)' +repeat = true +symbol = '❯' +repeat_offset = 1 +threshold = 0 +``` + ## Singularity The `singularity` module shows the current [Singularity](https://sylabs.io/singularity/) image, if inside a container diff --git a/src/configs/shlvl.rs b/src/configs/shlvl.rs index ad05a2131..052093568 100644 --- a/src/configs/shlvl.rs +++ b/src/configs/shlvl.rs @@ -12,6 +12,7 @@ pub struct ShLvlConfig<'a> { pub format: &'a str, pub symbol: &'a str, pub repeat: bool, + pub repeat_offset: u64, pub style: &'a str, pub disabled: bool, } @@ -23,6 +24,7 @@ impl<'a> Default for ShLvlConfig<'a> { format: "[$symbol$shlvl]($style) ", symbol: "↕️ ", // extra space for emoji repeat: false, + repeat_offset: 0, style: "bold yellow", disabled: true, } diff --git a/src/modules/shlvl.rs b/src/modules/shlvl.rs index 1e1e3cae0..48d22ec89 100644 --- a/src/modules/shlvl.rs +++ b/src/modules/shlvl.rs @@ -22,11 +22,20 @@ pub fn module<'a>(context: &'a Context) -> Option> { let shlvl_str = &shlvl.to_string(); - let repeat_count = if config.repeat { + let mut repeat_count: usize = if config.repeat { shlvl.try_into().unwrap_or(1) } else { 1 }; + + if config.repeat_offset > 0 { + repeat_count = + repeat_count.saturating_sub(config.repeat_offset.try_into().unwrap_or(usize::MAX)); + if repeat_count == 0 { + return None; + } + } + let symbol = if repeat_count != 1 { Cow::Owned(config.symbol.repeat(repeat_count)) } else { @@ -219,4 +228,33 @@ mod tests { assert_eq!(expected, actual); } + + #[test] + fn repeat_offset() { + fn get_actual(shlvl: usize, repeat_offset: usize, threshold: usize) -> Option { + ModuleRenderer::new("shlvl") + .config(toml::toml! { + [shlvl] + format = "[$symbol]($style)" + symbol = "~" + repeat = true + repeat_offset = repeat_offset + disabled = false + threshold = threshold + }) + .env(SHLVL_ENV_VAR, format!("{}", shlvl)) + .collect() + } + + assert_eq!( + get_actual(2, 0, 0), + Some(format!("{}", style().paint("~~"))) + ); + assert_eq!(get_actual(2, 1, 0), Some(format!("{}", style().paint("~")))); + assert_eq!(get_actual(2, 2, 0), None); // offset same as shlvl; hide + assert_eq!(get_actual(2, 3, 0), None); // offset larger than shlvl; hide + assert_eq!(get_actual(2, 1, 3), None); // high threshold; hide + // threshold not high enough; hide + assert_eq!(get_actual(2, 1, 2), Some(format!("{}", style().paint("~")))); + } } From 89cad4261c24722edd05056547fc637917cb992e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 14 Jul 2023 21:54:07 +0000 Subject: [PATCH 17/27] build(deps): update crate-ci/typos action to v1.16.1 --- .github/workflows/spell-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/spell-check.yml b/.github/workflows/spell-check.yml index a52b205e5..9d9b26a08 100644 --- a/.github/workflows/spell-check.yml +++ b/.github/workflows/spell-check.yml @@ -7,4 +7,4 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: crate-ci/typos@v1.16.0 + - uses: crate-ci/typos@v1.16.1 From fbc9389b208584c1c22b9af4661bb32d2829dc6e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 14 Jul 2023 21:54:33 +0000 Subject: [PATCH 18/27] build(deps): update rust crate toml_edit to 0.19.14 --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bb048c6a7..41f66467c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3209,9 +3209,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.19.13" +version = "0.19.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f8751d9c1b03c6500c387e96f81f815a4f8e72d142d2d4a9ffa6fedd51ddee7" +checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" dependencies = [ "indexmap 2.0.0", "serde", diff --git a/Cargo.toml b/Cargo.toml index fa859719e..67371cbd6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -81,7 +81,7 @@ strsim = "0.10.0" systemstat = "=0.2.3" terminal_size = "0.2.6" toml = { version = "0.7.6", features = ["preserve_order"] } -toml_edit = "0.19.13" +toml_edit = "0.19.14" unicode-segmentation = "1.10.1" unicode-width = "0.1.10" urlencoding = "2.1.2" From 9b08414b2fbfce51d3dc32f0b6a123ad55def5b1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 15 Jul 2023 22:34:03 +0000 Subject: [PATCH 19/27] build(deps): update rust crate semver to 1.0.18 --- Cargo.lock | 6 +++--- Cargo.toml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 41f66467c..a4eaeecf8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2674,9 +2674,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" +checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" [[package]] name = "semver-parser" @@ -2921,7 +2921,7 @@ dependencies = [ "regex", "rust-ini", "schemars", - "semver 1.0.17", + "semver 1.0.18", "serde", "serde_json", "sha1", diff --git a/Cargo.toml b/Cargo.toml index 67371cbd6..80a46644b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -69,7 +69,7 @@ rand = "0.8.5" rayon = "1.7.0" regex = { version = "1.9.1", default-features = false, features = ["perf", "std", "unicode-perl"] } rust-ini = "0.19.0" -semver = "1.0.17" +semver = "1.0.18" serde = { version = "1.0.171", features = ["derive"] } serde_json = "1.0.102" sha1 = "0.10.5" From edf265b5f611ad0656c75b26066d920a0fb5b9ec Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 15 Jul 2023 22:34:27 +0000 Subject: [PATCH 20/27] build(deps): update rust crate serde_json to 1.0.103 --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a4eaeecf8..77b3fb1b0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2720,9 +2720,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.102" +version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5062a995d481b2308b6064e9af76011f2921c35f97b0468811ed9f6cd91dfed" +checksum = "d03b412469450d4404fe8499a268edd7f8b79fecb074b0d812ad64ca21f4031b" dependencies = [ "itoa", "ryu", diff --git a/Cargo.toml b/Cargo.toml index 80a46644b..bebf638b7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -71,7 +71,7 @@ regex = { version = "1.9.1", default-features = false, features = ["perf", "std" rust-ini = "0.19.0" semver = "1.0.18" serde = { version = "1.0.171", features = ["derive"] } -serde_json = "1.0.102" +serde_json = "1.0.103" sha1 = "0.10.5" shadow-rs = { version = "0.23.0", default-features = false } # battery is optional (on by default) because the crate doesn't currently build for Termux From 619a3cf53d07f6b3ab7f3e513fd03c1213f55e5d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 17 Jul 2023 12:07:19 +0000 Subject: [PATCH 21/27] build(deps): update pest crates to 2.7.1 --- Cargo.lock | 16 ++++++++-------- Cargo.toml | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 77b3fb1b0..a32a9481d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2244,9 +2244,9 @@ checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pest" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f73935e4d55e2abf7f130186537b19e7a4abc886a0252380b59248af473a3fc9" +checksum = "0d2d1d55045829d65aad9d389139882ad623b33b904e7c9f1b10c5b8927298e5" dependencies = [ "thiserror", "ucd-trie", @@ -2254,9 +2254,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aef623c9bbfa0eedf5a0efba11a5ee83209c326653ca31ff019bec3a95bfff2b" +checksum = "5f94bca7e7a599d89dea5dfa309e217e7906c3c007fb9c3299c40b10d6a315d3" dependencies = [ "pest", "pest_generator", @@ -2264,9 +2264,9 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3e8cba4ec22bada7fc55ffe51e2deb6a0e0db2d0b7ab0b103acc80d2510c190" +checksum = "99d490fe7e8556575ff6911e45567ab95e71617f43781e5c05490dc8d75c965c" dependencies = [ "pest", "pest_meta", @@ -2277,9 +2277,9 @@ dependencies = [ [[package]] name = "pest_meta" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01f71cb40bd8bb94232df14b946909e14660e33fc05db3e50ae2a82d7ea0ca0" +checksum = "2674c66ebb4b4d9036012091b537aae5878970d6999f81a265034d85b136b341" dependencies = [ "once_cell", "pest", diff --git a/Cargo.toml b/Cargo.toml index bebf638b7..3fdaeac33 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -62,8 +62,8 @@ open = "5.0.0" # update os module config and tests when upgrading os_info os_info = "3.7.0" path-slash = "0.2.1" -pest = "2.7.0" -pest_derive = "2.7.0" +pest = "2.7.1" +pest_derive = "2.7.1" quick-xml = "0.29.0" rand = "0.8.5" rayon = "1.7.0" From d6a2c5558bcbbb053e5effc9db1dbc1a502837b7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 18 Jul 2023 05:11:38 +0000 Subject: [PATCH 22/27] build(deps): update rust crate clap to 4.3.15 --- Cargo.lock | 12 ++++++------ Cargo.toml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a32a9481d..affd4a062 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -369,9 +369,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.3.11" +version = "4.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1640e5cc7fb47dbb8338fd471b105e7ed6c3cb2aeb00c2e067127ffd3764a05d" +checksum = "8f644d0dac522c8b05ddc39aaaccc5b136d5dc4ff216610c5641e3be5becf56c" dependencies = [ "clap_builder", "clap_derive", @@ -380,9 +380,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.3.11" +version = "4.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98c59138d527eeaf9b53f35a77fcc1fad9d883116070c63d5de1c7dc7b00c72b" +checksum = "af410122b9778e024f9e0fb35682cc09cc3f85cad5e8d3ba8f47a9702df6e73d" dependencies = [ "anstream", "anstyle", @@ -404,9 +404,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.3.2" +version = "4.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8cd2b2a819ad6eec39e8f1d6b53001af1e5469f8c177579cdaeb313115b825f" +checksum = "54a9bb5758fc5dfe728d1019941681eccaf0cf8a4189b692a0ee2f2ecf90a050" dependencies = [ "heck", "proc-macro2", diff --git a/Cargo.toml b/Cargo.toml index 3fdaeac33..80154ab9d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,7 +43,7 @@ gix-faster = ["gix-features/zlib-stock", "gix/fast-sha1"] [dependencies] chrono = { version = "0.4.26", default-features = false, features = ["clock", "std", "wasmbind"] } -clap = { version = "4.3.11", features = ["derive", "cargo", "unicode"] } +clap = { version = "4.3.15", features = ["derive", "cargo", "unicode"] } clap_complete = "4.3.2" dirs-next = "2.0.0" dunce = "1.0.4" From 7992862294b1c453196dbb30359b0cf7dd3d6e40 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 18 Jul 2023 21:28:55 +0000 Subject: [PATCH 23/27] build(deps): update rust crate clap to 4.3.16 --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index affd4a062..cfda768b0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -369,9 +369,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.3.15" +version = "4.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f644d0dac522c8b05ddc39aaaccc5b136d5dc4ff216610c5641e3be5becf56c" +checksum = "74bb1b4028935821b2d6b439bba2e970bdcf740832732437ead910c632e30d7d" dependencies = [ "clap_builder", "clap_derive", @@ -380,9 +380,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.3.15" +version = "4.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af410122b9778e024f9e0fb35682cc09cc3f85cad5e8d3ba8f47a9702df6e73d" +checksum = "5ae467cbb0111869b765e13882a1dbbd6cb52f58203d8b80c44f667d4dd19843" dependencies = [ "anstream", "anstyle", diff --git a/Cargo.toml b/Cargo.toml index 80154ab9d..371c94512 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,7 +43,7 @@ gix-faster = ["gix-features/zlib-stock", "gix/fast-sha1"] [dependencies] chrono = { version = "0.4.26", default-features = false, features = ["clock", "std", "wasmbind"] } -clap = { version = "4.3.15", features = ["derive", "cargo", "unicode"] } +clap = { version = "4.3.16", features = ["derive", "cargo", "unicode"] } clap_complete = "4.3.2" dirs-next = "2.0.0" dunce = "1.0.4" From 7402dfa90dd0344ffe361e8520bae00dd4a0211a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 19 Jul 2023 12:03:21 +0000 Subject: [PATCH 24/27] build(deps): update gitoxide crates --- Cargo.lock | 208 ++++++++++++++++++++++++++++++++++------------------- Cargo.toml | 4 +- 2 files changed, 137 insertions(+), 75 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cfda768b0..05a7d1e64 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -733,6 +733,15 @@ version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +[[package]] +name = "encoding_rs" +version = "0.8.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" +dependencies = [ + "cfg-if", +] + [[package]] name = "enumflags2" version = "0.7.7" @@ -966,9 +975,9 @@ dependencies = [ [[package]] name = "gix" -version = "0.48.0" +version = "0.49.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1e74cea676de7f53a79f3c0365812b11f6814b81e671b8ee4abae6ca09c7881" +checksum = "3eb22530188fa1a6921b9f1aed3183357936e450ed060d65e578b46cd1c66a33" dependencies = [ "gix-actor", "gix-attributes", @@ -978,8 +987,9 @@ dependencies = [ "gix-date", "gix-diff", "gix-discover", - "gix-features", - "gix-fs", + "gix-features 0.32.0", + "gix-filter", + "gix-fs 0.4.0", "gix-glob", "gix-hash", "gix-hashtable", @@ -1014,9 +1024,9 @@ dependencies = [ [[package]] name = "gix-actor" -version = "0.23.0" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1969b77b9ee4cc1755c841987ec6f7622aaca95e952bcafb76973ae59d1b8716" +checksum = "1b2ec47eabd8edbb375e1c5cf11a2673805ae2ee02f797923fcefc3106d39f3b" dependencies = [ "bstr", "btoi", @@ -1028,9 +1038,9 @@ dependencies = [ [[package]] name = "gix-attributes" -version = "0.14.1" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3772b0129dcd1fc73e985bbd08a1482d082097d2915cb1ee31ce8092b8e4434" +checksum = "f97977acd02cb3369833a428b38d74960fa90dc6f58312e54e9388f293b0d93b" dependencies = [ "bstr", "gix-glob", @@ -1063,22 +1073,22 @@ dependencies = [ [[package]] name = "gix-command" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb49ab557a37b0abb2415bca2b10e541277dff0565deb5bd5e99fd95f93f51eb" +checksum = "378d6a93c87616a58f2c5b40ed0ca554255ba4ce3aa35cf1d597b270d06756a7" dependencies = [ "bstr", ] [[package]] name = "gix-commitgraph" -version = "0.17.1" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed42baa50075d41c1a0931074ce1a97c5797c7c6fe7591d9f1f2dcd448532c26" +checksum = "c9792d974e0a54e4655b676058e0b84a76e380fa82405f296734c1f943c5c8a5" dependencies = [ "bstr", "gix-chunk", - "gix-features", + "gix-features 0.32.0", "gix-hash", "memmap2", "thiserror", @@ -1086,13 +1096,13 @@ dependencies = [ [[package]] name = "gix-config" -version = "0.25.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "817688c7005a716d9363e267913526adea402dabd947f4ba63842d10cc5132af" +checksum = "cfc134ddb07881832e50620f4b3dc0e5cb6734b80509d582a0c2bd31869f8f7f" dependencies = [ "bstr", "gix-config-value", - "gix-features", + "gix-features 0.32.0", "gix-glob", "gix-path", "gix-ref", @@ -1108,9 +1118,9 @@ dependencies = [ [[package]] name = "gix-config-value" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83960be5e99266bcf55dae5a24731bbd39f643bfb68f27e939d6b06836b5b87d" +checksum = "731170f6ada8932ddd990548f98354cc1d027509caddfdf0c8e2c0c5e94d7d1b" dependencies = [ "bitflags 2.3.3", "bstr", @@ -1121,9 +1131,9 @@ dependencies = [ [[package]] name = "gix-credentials" -version = "0.16.1" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75a75565e0e6e7f80cfa4eb1b05cc448c6846ddd48dcf413a28875fbc11ee9af" +checksum = "0696fcd658b6526beff1c2716d3c94466eb2dbfaf1ecf8d961883884b687ce6d" dependencies = [ "bstr", "gix-command", @@ -1149,9 +1159,9 @@ dependencies = [ [[package]] name = "gix-diff" -version = "0.32.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaf5d9b9b521b284ebe53ee69eee33341835ec70edc314f36b2100ea81396121" +checksum = "accf7bfad64777ab5297bd918431f359fb39eb1d519743c2059ba5af7a513229" dependencies = [ "gix-hash", "gix-object", @@ -1161,9 +1171,9 @@ dependencies = [ [[package]] name = "gix-discover" -version = "0.21.1" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "272aad20dc63dedba76615373dd8885fb5aebe4795e5b5b0aa2a24e63c82085c" +checksum = "78ddcd031c607da6acb52f6c8e3c0a50cc444ed03d444d22c6a2a772ea70a051" dependencies = [ "bstr", "dunce", @@ -1179,6 +1189,17 @@ name = "gix-features" version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06142d8cff5d17509399b04052b64d2f9b3a311d5cff0b1a32b220f62cd0d595" +dependencies = [ + "gix-hash", + "gix-trace", + "libc", +] + +[[package]] +name = "gix-features" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f708dc9875d1b3e05c1cbadfd22e5b543c733c511191798587ec479115664221" dependencies = [ "crc32fast", "crossbeam-channel", @@ -1196,24 +1217,53 @@ dependencies = [ "walkdir", ] +[[package]] +name = "gix-filter" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8c9b3fc103a4976e4991ad949a9929fe6da5499e9f788b7f207471ec21763c7" +dependencies = [ + "bstr", + "encoding_rs", + "gix-attributes", + "gix-command", + "gix-hash", + "gix-object", + "gix-packetline-blocking", + "gix-path", + "gix-quote", + "gix-trace", + "smallvec", + "thiserror", +] + [[package]] name = "gix-fs" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb15956bc0256594c62a2399fcf6958a02a11724217eddfdc2b49b21b6292496" dependencies = [ - "gix-features", + "gix-features 0.31.1", +] + +[[package]] +name = "gix-fs" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86ca81d3888c5b0ac908cbe6ee975451b117b475324987f8aecf42bc5d9e4279" +dependencies = [ + "gix-features 0.32.0", ] [[package]] name = "gix-glob" -version = "0.9.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c18bdff83143d61e7d60da6183b87542a870d026b2a2d0b30170b8e9c0cd321a" +checksum = "b1ddc03b04f2ef410e156c90d05080651e06f617a2d083030a5daff5e6fe0b88" dependencies = [ "bitflags 2.3.3", "bstr", - "gix-features", + "gix-features 0.32.0", "gix-path", ] @@ -1240,9 +1290,9 @@ dependencies = [ [[package]] name = "gix-ignore" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca801f2d0535210f77b33e2c067d565aedecacc82f1b3dbce26da1388ebc4634" +checksum = "65ffd8e8860fd2eff53038101828fe8d19e5aad9dc869d9f1fbea825cf2830cf" dependencies = [ "bstr", "gix-glob", @@ -1252,16 +1302,16 @@ dependencies = [ [[package]] name = "gix-index" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68099abdf6ee50ae3c897e8b05de96871cbe54d52a37cdf559101f911b883562" +checksum = "e447ecb5c8365cdd1d8fe55d6cb047279657ef1747c4347755a4b64ff3b2f0d6" dependencies = [ "bitflags 2.3.3", "bstr", "btoi", "filetime", "gix-bitmap", - "gix-features", + "gix-features 0.32.0", "gix-hash", "gix-lock", "gix-object", @@ -1285,9 +1335,9 @@ dependencies = [ [[package]] name = "gix-mailmap" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1787e3c37fc43b1f7c0e3be6196c6837b3ba5f869190dfeaa444b816f0a7f34b" +checksum = "fe5a913fd8f56ea21cbd3b8bf813e0b410771682a065a14a4e9dede1012cd532" dependencies = [ "bstr", "gix-actor", @@ -1297,9 +1347,9 @@ dependencies = [ [[package]] name = "gix-negotiate" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e7bce64d4452dd609f44d04b14b29da2e0ad2c45fcdf4ce1472a5f5f8ec21c2" +checksum = "945302d90a0519a31acc42e7584d1e08156ef59b179e3bbf1fd9c0e40d819e64" dependencies = [ "bitflags 2.3.3", "gix-commitgraph", @@ -1313,15 +1363,15 @@ dependencies = [ [[package]] name = "gix-object" -version = "0.32.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a953f3d7ffad16734aa3ab1d05807972c80e339d1bd9dde03e0198716b99e2a6" +checksum = "bf32d43ccbeb9f2f54a74ee0a4b6a37143b0ba18a22288f4b790869cce232c46" dependencies = [ "bstr", "btoi", "gix-actor", "gix-date", - "gix-features", + "gix-features 0.32.0", "gix-hash", "gix-validate", "hex", @@ -1333,13 +1383,13 @@ dependencies = [ [[package]] name = "gix-odb" -version = "0.49.1" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6418cff00ecc2713b58c8e04bff30dda808fbba1a080e7248b299d069894a01" +checksum = "892c87273faa345ea12438c4ce2b89be15ae4abfda383035b8a3950965327d97" dependencies = [ "arc-swap", "gix-date", - "gix-features", + "gix-features 0.32.0", "gix-hash", "gix-object", "gix-pack", @@ -1352,14 +1402,14 @@ dependencies = [ [[package]] name = "gix-pack" -version = "0.39.1" +version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "414935138d90043ea5898de7a93f02c2558e52652492719470e203ef26a8fd0a" +checksum = "3163c2bdbb1ec45a717b5bbab69d715b2a5711c19f91f9a3045c6f805cc59c83" dependencies = [ "clru", "gix-chunk", "gix-diff", - "gix-features", + "gix-features 0.32.0", "gix-hash", "gix-hashtable", "gix-object", @@ -1373,6 +1423,17 @@ dependencies = [ "uluru", ] +[[package]] +name = "gix-packetline-blocking" +version = "0.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aef45b51fba629b588c3c50b57c815edebd5dddf7daa33736c33f160f9a64f34" +dependencies = [ + "bstr", + "hex", + "thiserror", +] + [[package]] name = "gix-path" version = "0.8.3" @@ -1388,14 +1449,14 @@ dependencies = [ [[package]] name = "gix-prompt" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dfd363fd89a40c1e7bff9c9c1b136cd2002480f724b0c627c1bc771cd5480ec" +checksum = "abe84674ac2473f98dea1832f727ddb16acbff3262dbf226f0a9be188b9a922b" dependencies = [ "gix-command", "gix-config-value", "parking_lot", - "rustix 0.37.21", + "rustix 0.38.4", "thiserror", ] @@ -1412,14 +1473,14 @@ dependencies = [ [[package]] name = "gix-ref" -version = "0.32.1" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39453f4e5f23cddc2e6e4cca2ba20adfdbec29379e3ca829714dfe98ae068ccd" +checksum = "e368f5368279e97148a6214ec534bfebd1f29a0fe344947d92f488397bb27a08" dependencies = [ "gix-actor", "gix-date", - "gix-features", - "gix-fs", + "gix-features 0.32.0", + "gix-fs 0.4.0", "gix-hash", "gix-lock", "gix-object", @@ -1433,9 +1494,9 @@ dependencies = [ [[package]] name = "gix-refspec" -version = "0.13.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e76ff1f82fba295a121e31ab02f69642994e532c45c0c899aa393f4b740302" +checksum = "df521f8fc9cbd82d9abb01b8047b653de1e58c9b4b919d63218d7da2a9cd91d7" dependencies = [ "bstr", "gix-hash", @@ -1447,9 +1508,9 @@ dependencies = [ [[package]] name = "gix-revision" -version = "0.17.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "237428a7d3978e8572964e1e45d984027c2acc94df47e594baa6c4b0da7c9922" +checksum = "1503e94badcbb9d8dc6ea3063522798913ead8f37f564f2cc335eff572208178" dependencies = [ "bstr", "gix-date", @@ -1462,9 +1523,9 @@ dependencies = [ [[package]] name = "gix-revwalk" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "028d50fcaf8326a8f79a359490d9ca9fb4e2b51ac9ac86503560d0bcc888d2eb" +checksum = "3f43049c861d0de876d9022f61fddca4081f17c51d4dc5f7541621a076cb3218" dependencies = [ "gix-commitgraph", "gix-date", @@ -1493,7 +1554,7 @@ version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fac8310c17406ea619af72f42ee46dac795110f68f41b4f4fa231b69889c6a2" dependencies = [ - "gix-fs", + "gix-fs 0.3.0", "libc", "once_cell", "parking_lot", @@ -1510,9 +1571,9 @@ checksum = "103eac621617be3ebe0605c9065ca51a223279a23218aaf67d10daa6e452f663" [[package]] name = "gix-traverse" -version = "0.29.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3cdfd54598db4fae57d5ae6f52958422b2d13382d2745796bfe5c8015ffa86e" +checksum = "be19057a9ddef95af02d32b8b8d953cf974c4d378918e5e97d7345b843e0c271" dependencies = [ "gix-commitgraph", "gix-date", @@ -1526,12 +1587,12 @@ dependencies = [ [[package]] name = "gix-url" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "beaede6dbc83f408b19adfd95bb52f1dbf01fb8862c3faf6c6243e2e67fcdfa1" +checksum = "092d3f8f4040ee1b82830224e9002fff69248348af27dfdbcc8536db80283945" dependencies = [ "bstr", - "gix-features", + "gix-features 0.32.0", "gix-path", "home", "thiserror", @@ -1559,15 +1620,16 @@ dependencies = [ [[package]] name = "gix-worktree" -version = "0.21.1" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1363b9aa66b9e14412ac04e1f759827203f491729d92172535a8ce6cde02efa" +checksum = "07b773e8e249c13fce5757b15e2620078adfec9dcfbfc7d243fbabf5bb49f121" dependencies = [ "bstr", "filetime", "gix-attributes", - "gix-features", - "gix-fs", + "gix-features 0.32.0", + "gix-filter", + "gix-fs 0.4.0", "gix-glob", "gix-hash", "gix-ignore", @@ -1745,7 +1807,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24fddda5af7e54bf7da53067d6e802dbcc381d0a8eef629df528e3ebf68755cb" dependencies = [ "hermit-abi", - "rustix 0.38.1", + "rustix 0.38.4", "windows-sys", ] @@ -2606,9 +2668,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.1" +version = "0.38.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc6396159432b5c8490d4e301d8c705f61860b8b6c863bf79942ce5401968f3" +checksum = "0a962918ea88d644592894bc6dc55acc6c0956488adcebbfb6e273506b7fd6e5" dependencies = [ "bitflags 2.3.3", "errno 0.3.1", @@ -2899,7 +2961,7 @@ dependencies = [ "dunce", "gethostname", "gix", - "gix-features", + "gix-features 0.32.0", "guess_host_triple", "home", "indexmap 1.9.3", diff --git a/Cargo.toml b/Cargo.toml index 371c94512..c6c65e62d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -49,8 +49,8 @@ dirs-next = "2.0.0" dunce = "1.0.4" gethostname = "0.4.3" # default feature restriction addresses https://github.com/starship/starship/issues/4251 -gix = { version = "0.48.0", default-features = false, features = ["max-performance-safe"] } -gix-features = { version = "0.31.1", optional = true } +gix = { version = "0.49.1", default-features = false, features = ["max-performance-safe"] } +gix-features = { version = "0.32.0", optional = true } indexmap = { version = "1.9.3", features = ["serde"] } log = { version = "0.4.19", features = ["std"] } # notify-rust is optional (on by default) because the crate doesn't currently build for darwin with nix From b6a076455b7527d01b9944b5e64ac264c0d24b00 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 19 Jul 2023 18:40:05 +0000 Subject: [PATCH 25/27] build(deps): update rust crate clap to 4.3.17 --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 05a7d1e64..4cdfb82c6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -369,9 +369,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.3.16" +version = "4.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74bb1b4028935821b2d6b439bba2e970bdcf740832732437ead910c632e30d7d" +checksum = "5b0827b011f6f8ab38590295339817b0d26f344aa4932c3ced71b45b0c54b4a9" dependencies = [ "clap_builder", "clap_derive", @@ -380,9 +380,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.3.16" +version = "4.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ae467cbb0111869b765e13882a1dbbd6cb52f58203d8b80c44f667d4dd19843" +checksum = "9441b403be87be858db6a23edb493e7f694761acdc3343d5a0fcaafd304cbc9e" dependencies = [ "anstream", "anstyle", diff --git a/Cargo.toml b/Cargo.toml index c6c65e62d..a8c653984 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,7 +43,7 @@ gix-faster = ["gix-features/zlib-stock", "gix/fast-sha1"] [dependencies] chrono = { version = "0.4.26", default-features = false, features = ["clock", "std", "wasmbind"] } -clap = { version = "4.3.16", features = ["derive", "cargo", "unicode"] } +clap = { version = "4.3.17", features = ["derive", "cargo", "unicode"] } clap_complete = "4.3.2" dirs-next = "2.0.0" dunce = "1.0.4" From 31e1a863635c2b374df0cb1162fb2fcbb3dda62f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 20 Jul 2023 02:10:39 +0000 Subject: [PATCH 26/27] build(deps): update rust crate serde to 1.0.173 --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4cdfb82c6..8550bc0e1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2751,18 +2751,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.171" +version = "1.0.173" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30e27d1e4fd7659406c492fd6cfaf2066ba8773de45ca75e855590f856dc34a9" +checksum = "e91f70896d6720bc714a4a57d22fc91f1db634680e65c8efe13323f1fa38d53f" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.171" +version = "1.0.173" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "389894603bd18c46fa56231694f8d827779c0951a667087194cf9de94ed24682" +checksum = "a6250dde8342e0232232be9ca3db7aa40aceb5a3e5dd9bddbc00d99a007cde49" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index a8c653984..e6d16a5d3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -70,7 +70,7 @@ rayon = "1.7.0" regex = { version = "1.9.1", default-features = false, features = ["perf", "std", "unicode-perl"] } rust-ini = "0.19.0" semver = "1.0.18" -serde = { version = "1.0.171", features = ["derive"] } +serde = { version = "1.0.173", features = ["derive"] } serde_json = "1.0.103" sha1 = "0.10.5" shadow-rs = { version = "0.23.0", default-features = false } From 8f9372499984e87dccbbf1455826073a4d255239 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 20 Jul 2023 22:38:46 +0000 Subject: [PATCH 27/27] build(deps): update rust crate tempfile to 3.7.0 --- Cargo.lock | 9 ++++----- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8550bc0e1..6ed43a877 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3083,15 +3083,14 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.6.0" +version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6" +checksum = "5486094ee78b2e5038a6382ed7645bc084dc2ec433426ca4c3cb61e2007b8998" dependencies = [ - "autocfg", "cfg-if", - "fastrand 1.9.0", + "fastrand 2.0.0", "redox_syscall 0.3.5", - "rustix 0.37.21", + "rustix 0.38.4", "windows-sys", ] diff --git a/Cargo.toml b/Cargo.toml index e6d16a5d3..e7c900577 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -125,7 +125,7 @@ winres = "0.1.12" [dev-dependencies] mockall = "0.11" -tempfile = "3.6.0" +tempfile = "3.7.0" [profile.release] codegen-units = 1