gitnexus 1.6.4-rc.35 → 1.6.4-rc.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -135,20 +135,18 @@ export const analyzeCommand = async (inputPath, options) => {
135
135
  if (inputPath) {
136
136
  repoPath = path.resolve(inputPath);
137
137
  }
138
+ else if (options?.skipGit) {
139
+ // --skip-git: treat cwd as the index root, do not walk up to a parent git repo.
140
+ repoPath = path.resolve(process.cwd());
141
+ }
138
142
  else {
139
143
  const gitRoot = getGitRoot(process.cwd());
140
144
  if (!gitRoot) {
141
- if (!options?.skipGit) {
142
- console.log(' Not inside a git repository.\n Tip: pass --skip-git to index any folder without a .git directory.\n');
143
- process.exitCode = 1;
144
- return;
145
- }
146
- // --skip-git: fall back to cwd as the root
147
- repoPath = path.resolve(process.cwd());
148
- }
149
- else {
150
- repoPath = gitRoot;
145
+ console.log(' Not inside a git repository.\n Tip: pass --skip-git to index any folder without a .git directory.\n');
146
+ process.exitCode = 1;
147
+ return;
151
148
  }
149
+ repoPath = gitRoot;
152
150
  }
153
151
  const repoHasGit = hasGitDir(repoPath);
154
152
  if (!repoHasGit && !options?.skipGit) {
package/dist/cli/index.js CHANGED
@@ -23,7 +23,7 @@ program
23
23
  .option('--skills', 'Generate repo-specific skill files from detected communities')
24
24
  .option('--skip-agents-md', 'Skip updating the gitnexus section in AGENTS.md and CLAUDE.md')
25
25
  .option('--no-stats', 'Omit volatile file/symbol counts from AGENTS.md and CLAUDE.md')
26
- .option('--skip-git', 'Index a folder without requiring a .git directory')
26
+ .option('--skip-git', 'Treat the provided path/cwd as the index root and skip parent git-root discovery')
27
27
  .option('--name <alias>', 'Register this repo under a custom name in ~/.gitnexus/registry.json ' +
28
28
  '(disambiguates repos whose paths share a basename, e.g. two different .../app folders)')
29
29
  .option('--allow-duplicate-name', 'Register this repo even if another path already uses the same --name alias. ' +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gitnexus",
3
- "version": "1.6.4-rc.35",
3
+ "version": "1.6.4-rc.36",
4
4
  "description": "Graph-powered code intelligence for AI agents. Index any codebase, query via MCP or CLI.",
5
5
  "author": "Abhigyan Patwari",
6
6
  "license": "PolyForm-Noncommercial-1.0.0",