-
-
Notifications
You must be signed in to change notification settings - Fork 779
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Repomix already supports pulling in diffs via --include-diffs
(see PR #533). This enhancement will let users bundle recent commit history—specifically the output of git log --name-status
—into their archive with a simple flag.
Motivation:
- Change Visibility: Shows which files changed in each commit, helping reviewers and LLMs trace code evolution.
- Context: Complements low-level diffs with a concise, high-level history.
- Configurability: Users can limit how many commits to include.
Proposed Changes:
-
CLI Definition
// in src/cli/cliRun.ts (and types.ts) .option('--include-logs', 'include git log --name-status output in the archive') .option( '--include-logs-max-commits <number>', 'maximum number of commits to include in git log (default: 100)', { default: 100 } )
-
Config Schema
interface RepomixConfigCli { // ...existing fields output?: { git?: { includeLogs?: boolean; includeLogsMaxCommits?: number; } } }
-
Git Collection Logic
-
In your git collector (e.g.
src/core/git/gitCollector.ts
), whenconfig.output.git.includeLogs
istrue
, run:git log --name-status -n ${config.output.git.includeLogsMaxCommits}
-
Emit the result as a file (e.g.
repomix-git-log.txt
) inside the output bundle.
-
-
Documentation & Tests
-
Update
command-line-options.md
andREADME.md
to document--include-logs
and--include-logs-max-commits
. -
Add tests under
tests/
to verify:repomix --include-logs
producesrepomix-git-log.txt
.- The
--include-logs-max-commits
override is respected. - Default behavior uses 100 commits.
-
Hugo-Polloli
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request