Skip to content

Commit

Permalink
refactor (#450)
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Sep 23, 2022
1 parent 317e02a commit b42b08a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 20 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,9 @@ Please see _'Development Status'_ for a listing of all crates and their capabili
* Based on the [git-hours] algorithm.
* See the [discussion][git-hours-discussion] for some performance data.
* **the `gix` program** _(plumbing)_ - lower level commands for use in automation
* **progress**
* [x] **show** - provide an overview of what works and what doesn't from the perspective of the git configuration.
This is likely to change a lot over time depending on actual needs, but maybe useful for you to see
if particular git-configuration is picked up and where it deviates.
* **progress** - provide an overview of what works and what doesn't from the perspective of the git configuration.
This is likely to change a lot over time depending on actual needs, but maybe useful for you to see
if particular git-configuration is picked up and where it deviates.
* **config** - list the complete git configuration in human-readable form and optionally filter sections by name.
* **exclude**
* [x] **query** - check if path specs are excluded via gits exclusion rules like `.gitignore`.
Expand Down
7 changes: 2 additions & 5 deletions src/plumbing/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ use gitoxide_core::pack::verify;

use crate::{
plumbing::{
options::{
commit, config, credential, exclude, free, mailmap, odb, progress, remote, revision, tree, Args,
Subcommands,
},
options::{commit, config, credential, exclude, free, mailmap, odb, remote, revision, tree, Args, Subcommands},
show_progress,
},
shared::pretty::prepare_and_run,
Expand Down Expand Up @@ -115,7 +112,7 @@ pub fn main() -> Result<()> {
})?;

match cmd {
Subcommands::Progress(progress::Subcommands::Show) => show_progress(),
Subcommands::Progress => show_progress(),
Subcommands::Credential(cmd) => core::repository::credential(
repository(Mode::StrictWithGitInstallConfig)?,
match cmd {
Expand Down
13 changes: 2 additions & 11 deletions src/plumbing/options/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,23 +89,14 @@ pub enum Subcommands {
/// Interact with the exclude files like .gitignore.
#[clap(subcommand)]
Exclude(exclude::Subcommands),
#[clap(subcommand)]
Progress(progress::Subcommands),
/// Display overall progress of the gitoxide project as seen from the perspective of git-config.
Progress,
Config(config::Platform),
/// Subcommands that need no git repository to run.
#[clap(subcommand)]
Free(free::Subcommands),
}

pub mod progress {

#[derive(Debug, clap::Subcommand)]
pub enum Subcommands {
/// Show the implementation progress of gitoxide based on the git configuration that it consumes.
Show,
}
}

pub mod config {
/// Print all entries in a configuration file or access other sub-commands
#[derive(Debug, clap::Parser)]
Expand Down

0 comments on commit b42b08a

Please sign in to comment.