{"record":{"id":"061ba09298077623","repo":"nikivdev/code","slug":"ignored-requires-the-target-to-be-inside-a-git-r","errorCode":null,"errorMessage":"--ignored requires the target to be inside a git repository","messagePattern":"--ignored requires the target to be inside a git repository","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/code.rs","lineNumber":566,"sourceCode":"            ensure_dir(parent, opts.dry_run, &mut planned_dirs)?;\n        }\n    }\n\n    if opts.dry_run {\n        println!(\n            \"Would copy template {} -> {}\",\n            template_dir.display(),\n            target_display\n        );\n        if opts.ignored {\n            if let Some((repo_root, entry)) = gitignore_entry_for_target(&target)? {\n                println!(\n                    \"Would add {} to {}\",\n                    entry,\n                    repo_root.join(\".gitignore\").display()\n                );\n            } else {\n                bail!(\"--ignored requires the target to be inside a git repository\");\n            }\n        }\n        return Ok(());\n    }\n\n    copy_dir_all(&template_dir, &target)?;\n    println!(\"Created {}\", target_display);\n    if opts.ignored {\n        if let Some((repo_root, entry)) = gitignore_entry_for_target(&target)? {\n            ensure_gitignore_entry(&repo_root, &entry)?;\n        } else {\n            bail!(\"--ignored requires the target to be inside a git repository\");\n        }\n    }\n    Ok(())\n}\n\nfn migrate_project(opts: CodeMigrateOpts, root: &str) -> Result<()> {","sourceCodeStart":548,"sourceCodeEnd":584,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/code.rs#L548-L584","documentation":"Error \"--ignored requires the target to be inside a git repository\" thrown in nikivdev/code.","triggerScenarios":"Thrown at src/code.rs:566 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}