Skip to content

Conversation

@christian-schilling
Copy link
Member

Change: from-filter

@christian-schilling christian-schilling force-pushed the @changes/master/christian.schilling.de@gmail.com/from-filter branch 15 times, most recently from b8ff019 to d02579b Compare October 14, 2025 19:12
@christian-schilling christian-schilling force-pushed the @changes/master/christian.schilling.de@gmail.com/from-filter branch 14 times, most recently from 1736730 to 9ead7f6 Compare November 2, 2025 09:56
@christian-schilling christian-schilling force-pushed the @changes/master/christian.schilling.de@gmail.com/from-filter branch 19 times, most recently from a371dc6 to b5f262d Compare November 17, 2025 19:05
@christian-schilling christian-schilling force-pushed the @changes/master/christian.schilling.de@gmail.com/from-filter branch from b5f262d to 1b16b18 Compare November 17, 2025 19:09
Copilot finished reviewing on behalf of christian-schilling November 17, 2025 19:13
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

}

filter_concat = {
CMD_START ~ "concat" ~ "("
Copy link

Copilot AI Nov 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The filter_concat rule incorrectly uses "from" as its keyword instead of "concat". This will cause parsing conflicts since both filter_from and filter_concat would match the same input syntax :from(...). The keyword should be "concat" to match the intended :concat(...) syntax.

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

already fixed

Comment on lines +61 to +62
~ (rev ~ filter_spec)?
~ (CMD_SEP+ ~ (rev ~ filter_spec))*
Copy link

Copilot AI Nov 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The grammar for filter_from is more permissive than the implementation. The grammar allows optional arguments and multiple comma-separated pairs with (rev ~ filter_spec)? ~ (CMD_SEP+ ~ (rev ~ filter_spec))*, but the parsing code (lines 184-193 in parse.rs) requires exactly 2 elements. The grammar should enforce exactly one rev and one filter_spec by using rev ~ filter_spec without the optional ? and without the repetition *.

Suggested change
~ (rev ~ filter_spec)?
~ (CMD_SEP+ ~ (rev ~ filter_spec))*
~ rev ~ filter_spec

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We want to combine all those similar rules into one eventually so I'd like to keep it the same as the others.

Comment on lines +70 to +71
~ (rev ~ filter_spec)?
~ (CMD_SEP+ ~ (rev ~ filter_spec))*
Copy link

Copilot AI Nov 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The grammar for filter_concat is more permissive than the implementation. The grammar allows optional arguments and multiple comma-separated pairs with (rev ~ filter_spec)? ~ (CMD_SEP+ ~ (rev ~ filter_spec))*, but the parsing code (lines 198-204 in parse.rs) requires exactly 2 elements. The grammar should enforce exactly one rev and one filter_spec by using rev ~ filter_spec without the optional ? and without the repetition *.

Suggested change
~ (rev ~ filter_spec)?
~ (CMD_SEP+ ~ (rev ~ filter_spec))*
~ rev ~ filter_spec

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Want to keep it like that for now to make it easier to see the similarity with other rules.

Comment on lines 142 to 143
Produce a history that keeps the original history leading up to the specified commit `<sha>` unchanged,
but applies the given `:filter` to all commits from that commit onwards.
Copy link

Copilot AI Nov 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation is ambiguous about whether the specified commit itself is filtered. Based on the test case (concat.t), the specified commit remains unchanged and only commits AFTER it are filtered. The phrase "from that commit onwards" suggests the commit itself is filtered, but the actual behavior keeps it unchanged. Consider rephrasing to: "Produce a history that keeps the original history up to and including the specified commit <sha> unchanged, but applies the given :filter to all commits after that commit."

Suggested change
Produce a history that keeps the original history leading up to the specified commit `<sha>` unchanged,
but applies the given `:filter` to all commits from that commit onwards.
Produce a history that keeps the original history up to and including the specified commit `<sha>` unchanged,
but applies the given `:filter` to all commits after that commit.

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@christian-schilling christian-schilling force-pushed the @changes/master/christian.schilling.de@gmail.com/from-filter branch 3 times, most recently from 4193a7b to 0eed823 Compare November 17, 2025 19:50
@christian-schilling christian-schilling force-pushed the @changes/master/christian.schilling.de@gmail.com/from-filter branch from 0eed823 to ffe4854 Compare November 17, 2025 19:52
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.

3 participants