1
0
mirror of https://github.com/o2sh/onefetch synced 2024-06-30 22:54:20 +00:00
onefetch/Cargo.toml

95 lines
2.3 KiB
TOML
Raw Permalink Normal View History

2024-03-17 11:10:32 +00:00
[workspace.package]
authors = ["o2sh <ossama-hjaji@live.fr>"]
edition = "2021"
license = "MIT"
2024-05-07 22:05:47 +00:00
version = "2.21.0"
2024-03-17 11:10:32 +00:00
repository = "https://github.com/o2sh/onefetch"
[workspace]
members = ["ascii", "image", "manifest"]
[workspace.dependencies]
owo-colors = "3.5.0"
anyhow = "1.0"
clap = { version = "4.5.4", features = ["derive"] }
2024-03-17 11:10:32 +00:00
image = "0.24.9"
strum = { version = "0.25.0", features = ["derive"] }
2018-09-14 22:56:14 +00:00
[package]
2023-08-11 21:46:06 +00:00
authors.workspace = true
edition.workspace = true
version.workspace = true
license.workspace = true
repository.workspace = true
2021-10-24 12:04:08 +00:00
categories = ["command-line-utilities"]
2022-10-23 10:25:01 +00:00
description = "Command-line Git information tool"
2022-11-27 22:50:39 +00:00
exclude = ["docs/vercel/*"]
keywords = ["git", "cli", "terminal"]
2018-09-14 22:56:14 +00:00
name = "onefetch"
2022-12-03 18:35:15 +00:00
homepage = "https://onefetch.dev"
2024-03-17 10:58:54 +00:00
rust-version = "1.74.1"
2018-09-14 22:56:14 +00:00
2023-08-11 21:46:06 +00:00
[dependencies]
anyhow.workspace = true
askalono = "0.4.6"
byte-unit = "5.1.4"
bytecount = "0.6.8"
2023-08-11 21:46:06 +00:00
clap.workspace = true
clap_complete = "4.5.2"
crossbeam-channel = "0.5.12"
gix = { version = "0.63.0", default-features = false, features = [
2023-12-13 20:23:13 +00:00
"max-performance-safe",
"blob-diff",
"mailmap",
"index",
"status"
] }
gix-features = { version = "0.38.0", features = ["zlib-ng"] }
globset = "0.4.14"
human-panic = "1.2.1"
2023-08-11 21:46:06 +00:00
image.workspace = true
num-format = "0.4.4"
2023-11-29 14:45:54 +00:00
onefetch-ascii = { path = "ascii", version = "2.19.0" }
onefetch-image = { path = "image", version = "2.19.0" }
onefetch-manifest = { path = "manifest", version = "2.19.0" }
2023-08-11 21:46:06 +00:00
owo-colors.workspace = true
regex = "1.10.4"
serde = "1.0"
serde_json = "1.0"
serde_yaml = "0.9.34"
Bump clap from 3.1.18 to 3.2.5 and use clap derive (#685) * Bump clap from 3.1.18 to 3.2.1 Bumps [clap](https://github.com/clap-rs/clap) from 3.1.18 to 3.2.1. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v3.1.18...clap_complete-v3.2.1) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Sync clap and clap_complete versions * Fix deprecations for completion arg * Use `value_parser` for `TYPE` arg * Use `value_parser` for `authors-number` * Remove deprecated methods for `disable-fields` * Remove unused function * Fix deprecated CLI setup for `no-bots` The nice part about this is that now the regex is only parsed once instead of twice. * Fix deprecations for `--ascii-colors` and `--text-colors` * Fix deprecations for `--true-color` * Fix deprecations for `--ascii-input` * Fix deprecations for `--ascii-language` * Fix deprecations for `--color-resolution` * Fix deprecations for `--image-backend` * Fix deprecations for `--show-logo` * Fix deprecations for `-o` * Fix deprecation for `--image` * Fix deprecations for `--exclude` * Fix deprecation for positional input arg Error handling replaced with unwrap because the value parser should enforce that a valid path was passed at the command-line. * Use `SetTrue` actions for CLI flags * Remove unused imports * Replace unwrap or `Vec::new` with unwrap or default Resolves clippy errors. Co-authored-by: Ossama Hjaji <ossama-hjaji@live.fr> * Remove unnecessary `.clone` call Fixes clippy warning. * use Vec<u8> instead of Vec<String> for text-colors and ascii-colors * use PathBuf instead of String * use clap derive -- wip * use clap derive -- wip * use clap derive -- wip * bump clap to latest * switch to cargo derive * fix ci * add clap ArgEnum to oupt serialization format Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Spenser Black <spenserblack01@gmail.com> Co-authored-by: Ossama Hjaji <ossama-hjaji@live.fr>
2022-06-19 21:24:34 +00:00
# TODO With the new value parsers, we're really close to being able to eliminate
# the strum dependency
2023-08-11 21:46:06 +00:00
strum.workspace = true
time = { version = "0.3.36", features = ["formatting"] }
time-humanize = { version = "0.1.3", features = ["time"] }
2021-03-15 21:52:07 +00:00
tokei = "12.1.2"
typetag = "0.2"
gix upgrade and optimizations (#1081) * upgrade to latest gix v0.46 and make use of free traversal state. The latest improvements make more data available during commit iteration, which makes some improvements possible. Doing so potentially saves some time, even though it's not visible in practice. * change: bot commits now provide their commit time to first/most-recent commit information. In practice, this change is unlikely to be noticeable, especially since `--no-bots` is not enabled by default. However, if it is, bot commits will now contribute to the most recent commit times and the first commit times, which will help if the only commit is a bot commit. It also helps with allowing an upcoming multi-threaded implementation that leverages the commit-graph which in turn will greatly speed up information retrieval in large repositories. * refactor retrieval of commit graph information to make output clear This is in preparation for creating a multi-threaded version of it. * refactor retrieval of commit graph information to make output clear This is in preparation for creating a multi-threaded version of it. * refactoring - Extrat commit graph traversal logic out of CommitMetrics's constructor - renaming and simplified logic * minor * cargo fmt * remove is_shallow property from GitMetrics * Single thread for churn and author summary on main thread * process author sig in seperate thread * revert * refactor * unify logic to update number of commits by author. More notes related to the `use_commit_graph()` call: I was thinking about this API for a while, and it's the easiest way to configure this even though it seems redundant. Let me explain, maybe you can find a better solution. In an even more recent version, `use_commit_graph()` doesn't default to `true`, but defaults to the value of `core.commitGraph`, which in turn defaults to true. We, however, always want to use the commitgraph, under the condition that we can use enough threads *and* actually have a commit-graph. Now, one would think that `with_commit_graph` is enough to get what we want, but since `use_commit_graph` generally defaults to `true` under the hood it would make another attempt to open the commit-graph, even though there might not be one. This leads to the commit-graph detection to be run twice in the case there is none. Thus we explicitly set our verdict in `use_commit_graph` to avoid that kind of work. Does it matter, you might ask? Probably not on today's SSDs, a few `stat` calls don't matter, so if you want, you can remove the `use_commit_graph` call. By default, I want an API that allows to avoid any waste, which is why it's implemented that way. ---- More notes related to the overcommit of threads There isn't really a such a thing like exhausting threads, but indeed this implementation will overcommit a little bit for N threads: * N threads for author computation (author) * 1 thread for commit-iteration and author aggregation (aggregator) * 1 threads for churn computation (churn) The aggregator thread has to wait for (author) threads and won't be busy doing its work - thanks to the commit-graph these walks are very fast. It won't actually consume much CPU. The churn thread is the one that runs just as hot if not hotter than the author threads, and I intend to let these contend a little as typically a little bit of over-commit eeks out a little more performance in practice. This is due to IO still playing a role here and once a thread is blocked, it's good to have a choice of more threads to run. Further, the `churn` thread is operating on a best-effort basis so to me its fine to drown it out a little, if the OS decides to do that, but in turn it gets a little additional time while the author threads are joined, so it should even out. Fearless concurrency is fun :). * explicitly call use_commit_graph and with_commit_graph --------- Co-authored-by: o2sh <ossama-hjaji@live.fr>
2023-06-13 21:35:15 +00:00
parking_lot = "0.12"
2020-12-09 23:21:43 +00:00
[dev-dependencies]
criterion = "0.5.1"
gix-testtools = "0.13.0"
insta = { version = "1.39.0", features = ["json", "redactions"] }
pretty_assertions = "1.4.0"
rstest = "0.19.0"
2023-01-01 09:45:59 +00:00
[[bench]]
name = "repo"
harness = false
2020-09-04 12:50:49 +00:00
[build-dependencies]
lazy_static = "1"
regex = "1"
serde_json = "1"
serde_yaml = "0.9"
tera = { version = "1", default-features = false }
2020-10-26 14:25:11 +00:00
2022-11-27 17:42:55 +00:00
[target.'cfg(windows)'.build-dependencies]
winres = "0.1"
[target.'cfg(windows)'.dependencies]
enable-ansi-support = "0.2.1"
2020-10-26 14:25:11 +00:00
[features]
fail-on-deprecated = []