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
ShowOnlyCurrentBranch were not showing commits #10228
ShowOnlyCurrentBranch were not showing commits #10228
Conversation
@mstv should we show stash and notes for current only and branches? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've looked at the changes but I can't currently verify the correctness of the changes.
I think we ought to come up with integration tests which would exercise various filters and assert mber of entries in the revision grid.
You will need to read https://git-scm.com/docs/git-log and understand the order and dependency of options.
There are tests, some added in the recent refactoring. What was missing here was that the option was dependent for this option (most options are unrelated). That test was added (will be added for stash too). The option was also changed to be easier to understand from the man page. I have not used this myself yet, it is therefore this is a draft. (Was too late when creating.) |
96bb739
to
1bcdb5c
Compare
CodeFactor reports an issue due to the added test case generator FilterInfo_NotesStash |
1bcdb5c
to
0c5bdd4
Compare
I think at least I don't use notes (and I am not fond of auxilary commits). Though if one uses them, these commits could be of interest - at least if they are related to the visible branches. |
Changed the filter to include stash@{0}, added a test. -- |
The test
I think we must create a (set of) test repo(s) and verify that the expected commits are returned by git. |
a2e0cab
to
0c379e1
Compare
I pushed an update. If there were no stashes, the query failed. So back to a convoluted logic to get stash@{0} in the grid for current only... |
That is the same...
The Git arguments is the same in this scenario, so it is a different issue |
Git Notes must be excluded for --all
0c379e1
to
db64a50
Compare
Squashed the changes for "stash@{0}" for current/filtered. That commit could be separated too (I prefer to keep it in this though). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for working this out
Rebase merge this tomorrow |
Skip refs/notes (should also be skipped for --all). FilterInfoTests: proper regex Remove unneeded imports
04674c6
to
51fd2c5
Compare
Skip refs/notes (should also be skipped for --all). FilterInfoTests: proper regex Remove unneeded imports (cherry picked from commit 077046c)
Fixes #10225
Proposed changes
Git Notes must be excluded for --all only with the previous argument "--not --glob=notes --not".
Changed to the easier to understand "--exclude=refs/notes" that could be used independent of the various branch filters (including reflog).
However, "--exclude=refs/notes" only makes sense with --all, so kept there.
Test methodology
Adopted test.
(It is really of the kind to increase test coverage, so quite meaningless.)
Merge strategy
I agree that the maintainer squash merge this PR (if the commit message is clear).
✒️ I contribute this code under The Developer Certificate of Origin.