Skip to content

Commit f4afcd3

Browse files
committed
feat: git operation progress now displayed to user when using gix
Signed-off-by: Patrick Casey <patrick.casey1@outlook.com>
1 parent 6077a6e commit f4afcd3

File tree

7 files changed

+271
-33
lines changed

7 files changed

+271
-33
lines changed

Cargo.lock

Lines changed: 157 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

hipcheck/Cargo.toml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,10 @@ flate2 = "1.1.0"
4646
fs_extra = "1.3.0"
4747
futures = "0.3.31"
4848
gix = { version = "0.70.0", features = [
49-
"basic",
5049
"max-control",
51-
"zlib-stock",
5250
# use reqwest/rustls to avoid needing openssl
5351
"blocking-http-transport-reqwest-rust-tls",
52+
"zlib-stock",
5453
] }
5554
# Include with both a `path` and `version` reference.
5655
# Local builds will use the `path` dependency, which may be a newer
@@ -75,6 +74,15 @@ num-traits = "0.2.19"
7574
ordered-float = { version = "5.0.0", features = ["serde"] }
7675
packageurl = "0.4.1"
7776
pathbuf = "1.0.0"
77+
prodash = { version = "29.0.0", default-features = false, features = [
78+
"render-line",
79+
"render-line-autoconfigure",
80+
"render-line-crossterm",
81+
"unit-bytes",
82+
"unit-duration",
83+
"unit-human",
84+
] }
85+
prost = "0.13.5"
7886
rand = "0.9.0"
7987
rayon = "1.10.0"
8088
regex = "1.11.1"

hipcheck/src/shell/spinner_phase.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,13 @@ impl SpinnerPhase {
125125

126126
self.bar.finish_and_clear()
127127
}
128+
129+
/// Hide the progress bar temporarily, execute `f`, then redraw the progress bar
130+
///
131+
/// Useful for external code that writes to the standard output.
132+
pub fn suspend<F: FnOnce() -> R, R>(&self, f: F) -> R {
133+
self.bar.suspend(f)
134+
}
128135
}
129136

130137
/// A spinner phase tracking an [Iterator].

0 commit comments

Comments
 (0)