Skip to content

Commit b42b08a

Browse files
committed
refactor (#450)
1 parent 317e02a commit b42b08a

File tree

3 files changed

+7
-20
lines changed

3 files changed

+7
-20
lines changed

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,9 @@ Please see _'Development Status'_ for a listing of all crates and their capabili
2727
* Based on the [git-hours] algorithm.
2828
* See the [discussion][git-hours-discussion] for some performance data.
2929
* **the `gix` program** _(plumbing)_ - lower level commands for use in automation
30-
* **progress**
31-
* [x] **show** - provide an overview of what works and what doesn't from the perspective of the git configuration.
32-
This is likely to change a lot over time depending on actual needs, but maybe useful for you to see
33-
if particular git-configuration is picked up and where it deviates.
30+
* **progress** - provide an overview of what works and what doesn't from the perspective of the git configuration.
31+
This is likely to change a lot over time depending on actual needs, but maybe useful for you to see
32+
if particular git-configuration is picked up and where it deviates.
3433
* **config** - list the complete git configuration in human-readable form and optionally filter sections by name.
3534
* **exclude**
3635
* [x] **query** - check if path specs are excluded via gits exclusion rules like `.gitignore`.

src/plumbing/main.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@ use gitoxide_core::pack::verify;
1515

1616
use crate::{
1717
plumbing::{
18-
options::{
19-
commit, config, credential, exclude, free, mailmap, odb, progress, remote, revision, tree, Args,
20-
Subcommands,
21-
},
18+
options::{commit, config, credential, exclude, free, mailmap, odb, remote, revision, tree, Args, Subcommands},
2219
show_progress,
2320
},
2421
shared::pretty::prepare_and_run,
@@ -115,7 +112,7 @@ pub fn main() -> Result<()> {
115112
})?;
116113

117114
match cmd {
118-
Subcommands::Progress(progress::Subcommands::Show) => show_progress(),
115+
Subcommands::Progress => show_progress(),
119116
Subcommands::Credential(cmd) => core::repository::credential(
120117
repository(Mode::StrictWithGitInstallConfig)?,
121118
match cmd {

src/plumbing/options/mod.rs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -89,23 +89,14 @@ pub enum Subcommands {
8989
/// Interact with the exclude files like .gitignore.
9090
#[clap(subcommand)]
9191
Exclude(exclude::Subcommands),
92-
#[clap(subcommand)]
93-
Progress(progress::Subcommands),
92+
/// Display overall progress of the gitoxide project as seen from the perspective of git-config.
93+
Progress,
9494
Config(config::Platform),
9595
/// Subcommands that need no git repository to run.
9696
#[clap(subcommand)]
9797
Free(free::Subcommands),
9898
}
9999

100-
pub mod progress {
101-
102-
#[derive(Debug, clap::Subcommand)]
103-
pub enum Subcommands {
104-
/// Show the implementation progress of gitoxide based on the git configuration that it consumes.
105-
Show,
106-
}
107-
}
108-
109100
pub mod config {
110101
/// Print all entries in a configuration file or access other sub-commands
111102
#[derive(Debug, clap::Parser)]

0 commit comments

Comments
 (0)