-
-
Notifications
You must be signed in to change notification settings - Fork 570
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 support for recursive blame #2285
base: master
Are you sure you want to change the base?
Conversation
- Replaces `BlameFilePopup.blame: Option<BlameProcess>` with `BlameFilePopup.blame_stack: Vec<BlameProcess>`. - Adds keybinding for going back from a blame (`b`). - Makes keybinding for `blame` (`Shift+B`) work in the `popups/blame_file.rs` view, where it will take the commit and open a blame from that.
@@ -93,7 +93,7 @@ pub struct BlameFilePopup { | |||
table_state: std::cell::Cell<TableState>, | |||
key_config: SharedKeyConfig, | |||
current_height: std::cell::Cell<usize>, | |||
blame: Option<BlameProcess>, | |||
blame_stack: Vec<BlameProcess>, |
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 would like us to not keep this stack around. @cruessler and I agreed on working out an asynchronous blaming that will deliver results iteratively so the worst case scenarios are not as slow anymore and this stack will save a lot of data when going only in one direction through the blame history and only optimize for going back fast and not going back and forth.
Furthermore I have a gut feeling that it might lead to weird stacks when jumping to a file history from a blame and then to another blame again which will not properly reset the stack
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.
Ah, that makes sense. So, to clarify, do you want to a)
have somewhat of a non-popping stack, b)
just nix the back
functionality altogether, or c)
did you have something else in mind?
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.
Just a friendly ping :)
@extrawurst
Thanks for tackling this. I only had one comment or request to rework. Would love to add this feature |
lets fix the ci, and i noticed that when the popup is open the command bar goes blank, that seems wrong |
Will get on that when I get a chance! Appreciate the update. |
Also @extrawurst I'm not sure if you saw my other comment, but I needed some more info. |
This Pull Request closes #2194.
It changes the following:
BlameFilePopup.blame: Option<BlameProcess>
withBlameFilePopup.blame_stack: Vec<BlameProcess>
. This involved changing any references to it, which happened to be a fair amount.b
).blame
(Shift+B
) work in thepopups/blame_file.rs
view, where it will take the commit and open a blame from that.blame
andback
keybindings in blame_file.popups/file_revlog.rs
I followed the checklist:
make check
without errors (this reached the same pointmaster
does, which fails ontest_pre_commit_py
. Does this need an issue?)