{"record":{"id":"88839c39147f9aea","repo":"dmtrKovalenko/fff","slug":"git-repository-not-found-fff-mcp-will-still-work","errorCode":null,"errorMessage":"Git repository: not found (fff-mcp will still work, but git-status features are disabled)","messagePattern":"Git repository: not found \\(fff-mcp will still work, but git-status features are disabled\\)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"crates/fff-mcp/src/healthcheck.rs","lineNumber":50,"sourceCode":"        if path_exists {\n            &base_path\n        } else {\n            \"directory does not exist\"\n        },\n    );\n\n    // 2. Git repository\n    match Repository::discover(&base_path) {\n        Ok(repo) => {\n            if let Some(workdir) = repo.workdir() {\n                all_ok &= check(\"Git repository\", true, &format!(\"{}\", workdir.display()));\n            } else {\n                all_ok &= check(\"Git repository\", true, \"bare repository\");\n            }\n        }\n        Err(_) => {\n            // Not fatal — fff-mcp works without git, but worth flagging.\n            warn(\n                \"Git repository\",\n                \"not found (fff-mcp will still work, but git-status features are disabled)\",\n            );\n        }\n    }\n\n    // 3. Frecency database\n    if let Some(ref db_path) = args.frecency_db_path {\n        let parent_ok = std::path::Path::new(db_path)\n            .parent()\n            .is_some_and(|p| p.is_dir());\n        all_ok &= check(\n            \"Frecency DB\",\n            parent_ok,\n            if parent_ok {\n                db_path\n            } else {\n                \"parent directory does not exist\"","sourceCodeStart":32,"sourceCodeEnd":68,"githubUrl":"https://github.com/dmtrKovalenko/fff/blob/7f8537e70f0ea1210f9acbbfc4640141105cdc78/crates/fff-mcp/src/healthcheck.rs#L32-L68","documentation":"The fff-mcp healthcheck could not detect a git repository in the current working directory. This is a non-fatal warning: the MCP server runs fine, but git-status-based features (e.g. showing modified/untracked flags) are disabled. It is informational output from the doctor/healthcheck command, not a thrown exception.","triggerScenarios":"Running the fff-mcp healthcheck (run_healthcheck) in a directory that is not inside a git worktree (git detection returned Err) — e.g. a bare parent checkout, $HOME outside any repo, or a directory where git metadata is inaccessible.","commonSituations":"Starting the MCP server from a non-repo directory like /tmp or $HOME; running in CI where the repo was downloaded as a tarball without .git; restricted environments where .git is unreadable; intending bare-repo support but cwd points elsewhere.","solutions":["Run the server from inside a git repository (cd into the project) or configure the working directory to a repo path.","Clone the project with git rather than extracting an archive so .git exists.","Check filesystem permissions on .git if the directory should be a repo.","Ignore the warning if git-status features are not needed — the healthcheck marks it non-fatal."],"exampleFix":"// before\n// launching from a non-repo dir\nexec: fff-mcp serve\ncwd: /tmp\n// after\nexec: fff-mcp serve\ncwd: /home/user/my-project  # a git repository","handlingStrategy":"fallback","validationCode":"// before starting the server\nconst inRepo = spawnSync('git', ['rev-parse', '--is-inside-work-tree'], { cwd }).status === 0;\nif (!inRepo) console.warn('git-status features disabled: not a git repository');","typeGuard":null,"tryCatchPattern":"// healthcheck output is advisory; degrade gracefully\nif (!inGitRepo) {\n  disableGitStatusFeatures();\n  logger.warn('git-status features disabled: not a git repository');\n}","preventionTips":["Launch fff-mcp with cwd set to a git repository.","Clone repos with git instead of downloading archives in CI.","Verify .git readability when running in restricted environments.","Treat this healthcheck line as informational, not fatal."],"tags":["git","mcp","healthcheck"],"backgroundTag":"directory-not-found","analyzedSha":"7f8537e70f0ea1210f9acbbfc4640141105cdc78","analyzedAt":"2026-09-10T07:26:53.407Z","contentChangedAt":"2026-09-10T07:26:53.407Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}