Commit 04e8deb5 authored by Ben Boeckel's avatar Ben Boeckel

git: make the `GitError::subcommand` public

This is very useful in other crates.
parent e83733f6
Pipeline #148294 passed with stage
......@@ -52,7 +52,8 @@ pub enum GitError {
}
impl GitError {
pub(crate) fn subcommand(subcommand: &'static str, source: io::Error) -> Self {
/// Convenience method for constructing an error for a git subcommand failure.
pub fn subcommand(subcommand: &'static str, source: io::Error) -> Self {
GitError::Subcommand {
subcommand,
source,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment