Skip to main content

git_in_repo

Function git_in_repo 

Source
fn git_in_repo(repo: &Path, args: &[&str]) -> Option<String>
Expand description

Run git -C repo <args> with the ambient repo-location env scrubbed, returning stdout on exit 0.

GIT_DIR / GIT_WORK_TREE / GIT_COMMON_DIR override -C outright, so without the scrub a forge launched from a git hook, a git rebase --exec, or any shell that exported them answers every question about every repo from one foreign repo - at exit 0, with nothing in the output to say so.