Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a built-in function to revsets for searching file content changes, i.e. the commit diff #1338

Open
mfulbright opened this issue Jun 2, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@mfulbright
Copy link

I would find it useful to have a function that allows searching the contents of the diff of a commit. There are already built-in functions for searching by author name, email, etc., and searching file paths that were changed in the commit. A built-in for searching file content changes seems like a natural function to expose as well.

Perhaps it would be named contents.changed() to match the existing paths.changed() built-in:
contents.changed(text-pattern): all commits with a change to any file contents matching the specified pattern

And/or, breaking it out into 2 functions that specifically search additions and removals could be useful as well:
contents.added(text-pattern): all commits with an addition to any file contents matching the specified pattern
contents.removed(text-pattern): all commits with a removal to any file contents matching the specified pattern

@claytonrcarter claytonrcarter added the enhancement New feature or request label Jun 8, 2024
@arxanas
Copy link
Owner

arxanas commented Oct 9, 2024

Agreed it would be useful and would accept a PR; I don't plan to work on it myself.

@arxanas arxanas changed the title [Feature Request] Add a built-in function to revsets for searching file content changes, i.e. the commit diff Add a built-in function to revsets for searching file content changes, i.e. the commit diff Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants