1use std::path::Path;
2
3#[must_use]
8pub fn new(object: &str) -> Show<'_> {
9 Show::new(object)
10}
11
12#[derive(Debug)]
16pub struct Show<'a> {
17 repo_path: Option<&'a Path>,
18 object: &'a str,
19}
20
21crate::impl_repo_path!(Show);
22
23impl<'a> Show<'a> {
24 #[must_use]
25 fn new(object: &'a str) -> Self {
26 Self {
27 repo_path: None,
28 object,
29 }
30 }
31}
32
33impl crate::Build for Show<'_> {
34 fn build(self) -> cmd_proc::Command {
35 crate::base_command(self.repo_path)
36 .argument("show")
37 .argument(self.object)
38 }
39}
40
41#[cfg(feature = "test-utils")]
42impl Show<'_> {
43 pub fn test_eq(&self, other: &cmd_proc::Command) {
45 let command = crate::Build::build(Self {
46 repo_path: self.repo_path,
47 object: self.object,
48 });
49 command.test_eq(other);
50 }
51}