History

add aliases to make revision sub-commands more accessible

Sebastian Thiel committed 4 years ago

Commit a6d79e31 parent 2f506c71 file · +4 −2Browse files

Showing the changes to src (1 of 1 file). Show all

Unified · Split

src/plumbing/options.rs+4−2
@@ -180,12 +180,13 @@ pub mod commit { · 179 unmodified lines
180 180
181pub mod revision {181pub mod revision {
182 #[derive(Debug, clap::Subcommand)]182 #[derive(Debug, clap::Subcommand)]
183 #[clap(visible_alias = "rev")]183 #[clap(visible_alias = "rev", visible_alias = "r")]
184 pub enum Subcommands {184 pub enum Subcommands {
185 /// Provide the revision specification like `@~1` to explain.185 /// Provide the revision specification like `@~1` to explain.
186 #[clap(visible_alias = "e")]
186 Explain { spec: std::ffi::OsString },187 Explain { spec: std::ffi::OsString },
187 /// Try to resolve the given revspec and print the object names.188 /// Try to resolve the given revspec and print the object names.
188 #[clap(visible_alias = "query", visible_alias = "parse")]189 #[clap(visible_alias = "query", visible_alias = "parse", visible_alias = "p")]
189 Resolve {190 Resolve {
190 /// Instead of resolving a rev-spec, explain what would be done for the first spec.191 /// Instead of resolving a rev-spec, explain what would be done for the first spec.
191 ///192 ///
@@ -200,6 +201,7 @@ pub mod revision { · 8 unmodified lines
200 specs: Vec<std::ffi::OsString>,201 specs: Vec<std::ffi::OsString>,
201 },202 },
202 /// Return the names and hashes of all previously checked-out branches.203 /// Return the names and hashes of all previously checked-out branches.
204 #[clap(visible_alias = "prev")]
203 PreviousBranches,205 PreviousBranches,
204 }206 }
205}207}