Skip to content
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

Allow :back to work across separate blame views #1123

Closed
krobelus opened this issue Jul 4, 2021 · 0 comments · Fixed by #1127
Closed

Allow :back to work across separate blame views #1123

krobelus opened this issue Jul 4, 2021 · 0 comments · Fixed by #1127

Comments

@krobelus
Copy link
Contributor

krobelus commented Jul 4, 2021

The blame view supports going back to the previous commit:
after pressing b on some commit in blame mode (to show the blame view starting from that commit), we can use < to go back.

I suggest that we extend this feature to work across blame views, where it would be more useful to me.

When I use git blame to find the origin of a line, I oftend need to traverse commits that just moved the line.
I'll describe what I usually with the of how to find the origin of the first line in README.adoc.

  1. Run tig blame 529182c -- README.adoc
  2. Press <Enter> to inspect the commit that added the first line (c91ba8f).
    Observe that it's just a cosmetic change, which we want to skip over.
  3. Run :272 to go to the place in the diff where first README-line was changed.
    Now we are on the deleted line -Tig: text-mode interface for git
  4. Press b to go to the commit that introduced that line (b8ae934).
  5. Proposed feature: now, pressing < (back) should take me back to the commit in the first blame-view. This doesn't happen because each view has a separate history.

I'm not sure how to implement this. I think there is already just one blame-view instance, so it should be enough to simply not delete the old blame-view history when creating a new one.

koutcher added a commit to koutcher/tig that referenced this issue Jul 11, 2021
* stop clearing the history state when entering the blame view

* push a blame view history state before entering the diff view

* stop failing when trying to push an identical history state

Closes jonas#1123
koutcher added a commit that referenced this issue Oct 4, 2021
* stop clearing the history state when entering the blame view

* push a blame view history state before entering the diff view

* stop failing when trying to push an identical history state

Closes #1123
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 a pull request may close this issue.

1 participant