You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
Agreed it would be useful and would accept a PR; I don't plan to work on it myself.
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
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 patternAnd/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 patterncontents.removed(text-pattern)
: all commits with a removal to any file contents matching the specified patternThe text was updated successfully, but these errors were encountered: