Skip to content

Commit

Permalink
frame for gix repo rev explain (#427)
Browse files Browse the repository at this point in the history
Byron committed Jun 14, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 2c3491e commit 12e6277
Showing 3 changed files with 20 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/plumbing/main.rs
Original file line number Diff line number Diff line change
@@ -160,6 +160,9 @@ pub fn main() -> Result<()> {
use git_repository as git;
let repository = git::ThreadSafeRepository::discover(repository)?;
match cmd {
repo::Subcommands::Revision { cmd } => match cmd {
repo::revision::Subcommands::Explain { spec: _ } => todo!("describe spec"),
},
repo::Subcommands::Commit { cmd } => match cmd {
repo::commit::Subcommands::Describe {
annotated_tags,
16 changes: 15 additions & 1 deletion src/plumbing/options.rs
Original file line number Diff line number Diff line change
@@ -343,7 +343,7 @@ pub mod repo {
}

#[derive(Debug, clap::Subcommand)]
#[clap(alias = "repo")]
#[clap(visible_alias = "repo")]
pub enum Subcommands {
/// Verify the integrity of the entire repository
Verify {
@@ -375,6 +375,20 @@ pub mod repo {
#[clap(subcommand)]
cmd: exclude::Subcommands,
},
/// Query and obtain information about revisions.
Revision {
#[clap(subcommand)]
cmd: revision::Subcommands,
},
}

pub mod revision {
#[derive(Debug, clap::Subcommand)]
#[clap(visible_alias = "rev")]
pub enum Subcommands {
/// Provide the revision specification like `@~1` to explain.
Explain { spec: std::ffi::OsString },
}
}

pub mod exclude {
3 changes: 2 additions & 1 deletion src/porcelain/options.rs
Original file line number Diff line number Diff line change
@@ -84,7 +84,8 @@ pub enum ToolCommands {
about = "Estimate hours worked based on a commit history",
long_about = "See https://github.com/kimmobrunfeldt/git-hours#how-it-works for details",
version = clap::crate_version!(),
visible_alias = "h")
visible_alias = "h",
visible_alias = "hours")
]
pub struct EstimateHours {
/// The directory containing a '.git/' folder.

0 comments on commit 12e6277

Please sign in to comment.