fn commit<P: Commitish>(
        &self,
        parent: &P,
        merge_parent: Option<&dyn Commitish>,
        message: &str,
    ) -> Result<Commit, Output> {
        let mut cmd = vec!["commit-tree".to_string(), "-p".to_string()];
        let parent_spec = parent.get_commit_spec();
        cmd.push(parent_spec);
        if let Some(merge_parent) = merge_parent {
            cmd.push("-p".to_string());
            cmd.push(merge_parent.get_commit_spec());
        }
        cmd.push(self.get_tree_reference());
        cmd.push("-m".to_string());
        cmd.push(message.to_string());
        let output = run_git_command(&cmd)?;
        Ok(Commit {
            sha: output_to_string(&output),
        })
    }
/// Use the commit-tree command to generate a fake-merge commit.
Use the commit-tree command to generate a fake-merge commit.
Use the commit - tree command to generate a fake - merge commit .
fn commit<P: Commitish>(
        &self,
        parent: &P,
        merge_parent: Option<&dyn Commitish>,
        message: &str,
    ) -> Result<Commit, Output> {
        let mut cmd = vec!["commit-tree".to_string(), "-p".to_string()];
        let parent_spec = parent.get_commit_spec();
        cmd.push(parent_spec);
        if let Some(merge_parent) = merge_parent {
            cmd.push("-p".to_string());
            cmd.push(merge_parent.get_commit_spec());
        }
        cmd.push(self.get_tree_reference());
        cmd.push("-m".to_string());
        cmd.push(message.to_string());
        let output = run_git_command(&cmd)?;
        Ok(Commit {
            sha: output_to_string(&output),
        })
    }
fn commit < P : Commitish > ( & self , parent : & P , merge_parent : Option < & dyn Commitish > , message : & str , ) -> Result < Commit , Output > { let mut cmd = vec ! [ " " to_string ( ) " " to_string ( ) ] ; let parent_spec = parent . get_commit_spec ( ) ; cmd . push ( parent_spec ) ; if let Some ( merge_parent ) = merge_parent { cmd . push ( " " . to_string ( ) ) ; cmd . push ( merge_parent . get_commit_spec ( ) ) ; } cmd . push ( self . get_tree_reference ( ) ) ; cmd . push ( " " . to_string ( ) ) ; cmd . push ( message . to_string ( ) ) ; let output = run_git_command ( & cmd ) ? ; Ok ( Commit { sha : output_to_string ( & output ) , } ) }
Use the commit-tree command to generate a fake-merge commit.
Use the commit - tree command to generate a fake - merge commit .
&self
parent
&P
merge_parent
Option<&dyn Commitish>
message
&str
&self
parent
&P
merge_parent
Option<&dyn Commitish>
message
&str