Skip to content

Conversation

bairesearch
Copy link

update replace-message - add support for optional commit ID filter: end the line with '@CommitID#' and a commit ID to restrict the replacement expression to a particular commit.

For example;
foo==>bar@commitID#d760d24cf74a0ee68134d4b83a43d1e8ea3b6e1c

…nd the line with @CommitID# and a commit ID to restrict the replacement expression to a particular commit

Signed-off-by: Richard Baxter <[email protected]>
@bairesearch bairesearch force-pushed the branch-replaceMessageCommitFilter branch from c265921 to 939bbee Compare June 12, 2022 13:05
@tenkirin
Copy link

@newren
Any new progress about this one? I sought for this feature for a while and it turns out this feature is not merged yet.

@newren
Copy link
Owner

newren commented Nov 21, 2024

I'd rather do this similar to the --file-info-callback added in commit 6157207 (filter-repo: add a --file-info-callback, 2024-10-23), where the replace-text is available to the user in combination with both the file name and the file contents in a single callback, and the user can decide based on filename or file contents whether to apply the replace-text changes. Granted, that's in the context of modifying files, whereas this is considering commit messages, but the idea still translates -- make a callback where the user has access to both the commit message, the commit original_id, and the replace-message rules and can choose whether to apply them.

@rzr
Copy link

rzr commented Aug 26, 2025

May I suggest to use this prefix by default then it can human/machine parsable

Origin:  {reference}

@newren
Copy link
Owner

newren commented Aug 26, 2025

I appreciate the contribution, but with no response I think I'm going to close this one out based on my last comment. Feel free to reopen if you modify to use that strategy, or just open a new PR with that strategy implemented. Thanks!

@newren newren closed this Aug 26, 2025
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.

5 participants