Skip to content

feat(v0.6.0): stash, merge conflict, submodules, watch mode, config support, and enhanced CLI - #4

Merged
utkarsh232005 merged 1 commit into
KDM-cli:mainfrom
utkarsh232005:feat/v0.6.0-features
Sep 24, 2026
Merged

utkarsh232005 merged 1 commit into
KDM-cli:mainfrom
utkarsh232005:feat/v0.6.0-features

Conversation

@utkarsh232005

Copy link
Copy Markdown
Member

Summary

This PR implements the v0.6.0 feature roadmap for git-context:

1. Extended Context Properties

  • stashCount (number): Counts saved stash entries via git stash list.
  • mergeConflict (boolean): Detects unmerged files / ongoing merge conflict state via git ls-files --unmerged.
  • submodules (readonly SubmoduleInfo[]): Lists all configured submodules with path, commit, and dirty status via git submodule status.

2. Event-Driven Watch Mode (git.watch)

  • Adds git.watch(options) returning a GitWatcher (extends EventEmitter).
  • Polls Git state at configurable intervals (default: 2000ms).
  • Emits change (when branch, commit, or dirty status changes), dirty (when clean -> dirty), and clean (when dirty -> clean).
  • Clean resource disposal with watcher.stop().

3. Declarative Configuration Support

  • Automatic discovery of .gitcontextrc.json and package.json#gitContext.
  • Adds git.assertFromConfig() to enforce project assertions in a single call.
  • Adds git.loadConfig() to access the parsed configuration object.

4. CLI Enhancements

  • Color Output: Table output is color-coded by default on interactive TTYs.
  • --no-color: Disables ANSI color escapes (also honors NO_COLOR env var).
  • --format=<table|minimal|json>: Supports default table, machine-parseable JSON, and a compact one-liner (minimal, e.g. main* a1b2c3d [1↑0↓]) for prompts and status bars.
  • git-context init: Scaffolds .gitcontextrc.json and a starter scripts/deploy-guard.ts deployment check script.

5. Tests & Quality

  • Added tests/v060.test.ts with 34 new tests covering all new features and CLI options.
  • Total test count increased to 63 (all passing).
  • ESLint: 0 errors/warnings.
  • TypeScript: 0 typecheck errors.
  • Version bumped to 0.6.0.

Copilot AI lite review requested due to automatic review settings September 24, 2026 15:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Sep 24, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 32337193-b20f-4c88-b7db-b5136cabde75

📥 Commits

Reviewing files that changed from the base of the PR and between 420bb7e and 9b23c5c.

📒 Files selected for processing (13)
  • README.md
  • package.json
  • src/cli.ts
  • src/commands/merge-conflict.ts
  • src/commands/stash.ts
  • src/commands/submodules.ts
  • src/config.ts
  • src/git-context.ts
  • src/index.ts
  • src/types.ts
  • src/watch.ts
  • tests/git-context.test.ts
  • tests/v060.test.ts
 ____________________________________________________________________________________________
< It is easier to change the specification to fit the program than vice versa. - Alan Perlis >
 --------------------------------------------------------------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@utkarsh232005
utkarsh232005 merged commit 9f059b0 into KDM-cli:main Sep 24, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants