Skip to main content

git_command

Function git_command 

Source
pub fn git_command(repo_root: &Path) -> Command
Expand description

Always targets the repo via -C.

Repo-locating variables inherited from a parent process (e.g. a git hook exporting GIT_DIR / GIT_INDEX_FILE) must be scrubbed or they silently redirect every command to the wrong repository.