Skip to main content

assert_git_repo

Function assert_git_repo 

Source
pub fn assert_git_repo() -> Result<()>
Expand description

Ensures the current directory is within a Git repository.

§Errors

Returns an error if the current directory is not within a Git repository.

§Examples

use rusty_commit::git;

git::assert_git_repo().expect("Not in a git repository");