simple way to only include git-tracked files
Description
Maybe I missed this option but currently what I do is I create a custom include list that contains only files that show up in the in git tracking. And then add on some exclude patterns on top of that. It would be nice to have a way a more direct way to only include git tracked files.
Hi, @pchalasani ! Thank you for the suggestion!
We haven't released it yet, but we're implementing a feature to pass file lists via --stdin in #648.
This would allow you to do something like:
git ls-files | repomix --stdin
Would passing files through stdin satisfy your requirements?
Or if you have any specific options or features in mind that you'd prefer, please let us know.
Would passing files through stdin satisfy your requirements?
that would be awesome, thanks!
git ls-files | repomix --stdin
I assume when we do this RepoMix will also take into account the config.json with various include exclude patterns?
The current stdin implementation ignores existing include/ignore patterns, but thinking about it again, this breaks consistency with our existing processing logic. It would be more intuitive if stdin files could be injected into the included file set, with ignore patterns still being applied.
We’ll consider and implement it that way.
I've implemented the stdin feature you requested!
- https://github.com/yamadashy/repomix/pull/680
The stdin input respects your existing include/ignore patterns from configuration, so it works exactly as you wanted.
Please wait for the next release!
@pchalasani This feature has been implemented and released in v1.0.0!
https://github.com/yamadashy/repomix/releases/tag/v1.0.0
You can now easily include only git-tracked files using:
git ls-files | repomix --stdin
Please give it a try! Thank you for your suggestion!