nikivdev/code · error
Not a git repository.
Error message
Not a git repository.
What it means
Error "Not a git repository." thrown in nikivdev/code.
Source
Thrown at src/changes.rs:72
}
trace(&format!("unroll bundle: {}", hash));
unroll_bundle(&hash)
}
None => {
let env_keys = normalize_env_keys(&cmd.env)?;
trace(&format!("create bundle (env keys: {})", env_keys.len()));
create_bundle(&env_keys)
}
}
}
fn repo_root() -> Result<PathBuf> {
let output = Command::new("git")
.args(["rev-parse", "--show-toplevel"])
.output()
.context("failed to run git rev-parse")?;
if !output.status.success() {
bail!("Not a git repository.");
}
let root = String::from_utf8_lossy(&output.stdout).trim().to_string();
if root.is_empty() {
bail!("Unable to resolve git root.");
}
trace(&format!("repo root: {}", root));
Ok(PathBuf::from(root))
}
fn git_output_in(repo_root: &Path, args: &[&str]) -> Result<(String, bool)> {
let output = Command::new("git")
.current_dir(repo_root)
.args(args)
.output()
.with_context(|| format!("failed to run git {}", args.join(" ")))?;
let stdout = String::from_utf8_lossy(&output.stdout).to_string();
let stderr = String::from_utf8_lossy(&output.stderr).to_string();
let ok = output.status.success();View on GitHub (pinned to a747e741ae)
When it happens
Trigger: Thrown at src/changes.rs:72 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of nikivdev/code@a747e741ae (2026-09-01).
Data as JSON: /api/errors/c5b98686de45e947.
Report an issue: GitHub.