From e509373b26c9a7b120057fc6e75970568f328fc4 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Thu, 6 Aug 2020 21:10:25 +0800 Subject: [PATCH] Add versions back to main command, remove from sub-commands --- src/plumbing/pretty.rs | 5 ++++- src/porcelain/pretty.rs | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/plumbing/pretty.rs b/src/plumbing/pretty.rs index b39c2b294bd..6fa7bd16b40 100644 --- a/src/plumbing/pretty.rs +++ b/src/plumbing/pretty.rs @@ -12,7 +12,7 @@ mod options { use std::path::PathBuf; #[derive(Debug, Clap)] - #[clap(name = "gix-plumbing", about = "The git underworld")] + #[clap(name = "gix-plumbing", about = "The git underworld", version = clap::crate_version!())] #[clap(setting = AppSettings::SubcommandRequired)] #[clap(setting = AppSettings::ColoredHelp)] pub struct Args { @@ -46,6 +46,7 @@ mod options { /// /// This command can also be used to stream packs to standard input or to repair partial packs. #[clap(setting = AppSettings::ColoredHelp)] + #[clap(setting = AppSettings::DisableVersion)] IndexFromPack { /// Specify how to iterate the pack, defaults to 'verify' /// @@ -78,6 +79,7 @@ mod options { }, /// Verify the integrity of a pack or index file #[clap(setting = AppSettings::ColoredHelp)] + #[clap(setting = AppSettings::DisableVersion)] PackExplode { #[clap(long)] /// Read written objects back and assert they match their source. Fail the operation otherwise. @@ -116,6 +118,7 @@ mod options { }, /// Verify the integrity of a pack or index file #[clap(setting = AppSettings::ColoredHelp)] + #[clap(setting = AppSettings::DisableVersion)] PackVerify { /// output statistical information about the pack #[clap(long, short = "s")] diff --git a/src/porcelain/pretty.rs b/src/porcelain/pretty.rs index cdf147ba929..712f0a217a3 100644 --- a/src/porcelain/pretty.rs +++ b/src/porcelain/pretty.rs @@ -6,7 +6,7 @@ mod options { use clap::{AppSettings, Clap}; #[derive(Debug, Clap)] - #[clap(about = "The git")] + #[clap(about = "The rusty git", version = clap::crate_version!())] #[clap(setting = AppSettings::SubcommandRequired)] #[clap(setting = AppSettings::ColoredHelp)] pub struct Args { @@ -19,6 +19,7 @@ mod options { /// Initialize the repository in the current directory. #[clap(alias = "initialize")] #[clap(setting = AppSettings::ColoredHelp)] + #[clap(setting = AppSettings::DisableVersion)] Init, } }