use std::path::Path;
#[must_use]
pub fn new(object: &str) -> Show<'_> {
Show::new(object)
}
#[derive(Debug)]
pub struct Show<'a> {
repo_path: Option<&'a Path>,
object: &'a str,
}
crate::impl_repo_path!(Show);
impl<'a> Show<'a> {
#[must_use]
fn new(object: &'a str) -> Self {
Self {
repo_path: None,
object,
}
}
}
impl crate::Build for Show<'_> {
fn build(self) -> cmd_proc::Command {
crate::base_command(self.repo_path)
.argument("show")
.argument(self.object)
}
}
#[cfg(feature = "test-utils")]
impl Show<'_> {
pub fn test_eq(&self, other: &cmd_proc::Command) {
let command = crate::Build::build(Self {
repo_path: self.repo_path,
object: self.object,
});
command.test_eq(other);
}
}