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

file blame #484

Closed
extrawurst opened this issue Jan 11, 2021 · 8 comments · Fixed by #634
Closed

file blame #484

extrawurst opened this issue Jan 11, 2021 · 8 comments · Fixed by #634
Milestone

Comments

@extrawurst
Copy link
Owner

in our file trees we should be able to jump into a file blame mode known from all major git GUI tools.

for a first mvp it is probably enough to scroll by line and show the hash + author + date each line in a split-screen side-by-side.

from each line we should allow opening the matching commit details.

@cruessler
Copy link
Contributor

@extrawurst I’d like to give this one a try. Do you want blame mode to be part of the “Log” tab? I assume it is supposed to take over the full screen. Is that correct?

@extrawurst
Copy link
Owner Author

I agree it should take over the screen. Well I would suggest starting with a mock-up first just to align us on the plan. For reference check out how I did that for stashing: #3 (comment)

also look up some alternatives to get a good impression of what the user will expect. I personally tried to stay close to how fork does things.

@cruessler
Copy link
Contributor

For comparison, this is what tig and fork do. My first inclination would be to follow tig’s example for the content and add a border the way gitui’s “Log” view does where I would add the details that are in tig’s status bar at the bottom. What do you think?

tig-git-blame
fork-git-blame

@extrawurst
Copy link
Owner Author

extrawurst commented Feb 24, 2021

@cruessler I think the tig way is a good starting point. just a few ideas:

  • lets make the date more compact similar to what we do in the log view.
  • we don't need the status bar on the bottom telling us the amount of lines, we have scroll bars in the other diffs
  • I would jump into a InspectCommit view when you press 'enter' on one of the lines
  • nice improvement over tig is to combine entries on the left that are equal (merging the elements into a sort of hunk of lines that shares the same commit/author...) - this would make the view easier to read and navigate. this would be copied from the example we see in fork.

@extrawurst
Copy link
Owner Author

@cruessler any progress on this?

@cruessler
Copy link
Contributor

@extrawurst Yes, I’m planning to work on it this weekend and will likely be able to present the first results tomorrow.

@cruessler cruessler mentioned this issue Apr 11, 2021
8 tasks
cruessler added a commit to cruessler/gitui that referenced this issue Apr 11, 2021
@weihanglo
Copy link

Wow. Really looking forward to this issue being addressed!

I want to stretch this feature a bit: Is there any change to implement a subcommand to launch blame view directly? Such as gitui blame <file>. I find it useful when integrating with other terminal tools.

Here are a example of tig integration with neovim. It will launch blame view for line under current cursor:

function! Tig(args) abort
    let args = expandcmd(a:args)
    tabedit
    execute 'terminal tig ' . args
endfunction
command! -narg=* Tig call Tig(<q-args>)
command! Gblame execute 'Tig blame % +' . line('.')

@extrawurst
Copy link
Owner Author

@weihanglo thanks for your interest, I see your idea as a separate feature request. the first iteration of file-blame should be focused on getting that right so that it rocks. whether we allow opening gitui to go to specific views right on start depending on command line arguments is a different story in general.

cruessler added a commit to cruessler/gitui that referenced this issue Apr 18, 2021
cruessler added a commit to cruessler/gitui that referenced this issue Apr 20, 2021
extrawurst pushed a commit that referenced this issue Apr 21, 2021
This closes #484.
@extrawurst extrawurst added this to the v0.15 milestone Apr 21, 2021
@extrawurst extrawurst mentioned this issue Apr 21, 2021
6 tasks
extrawurst pushed a commit that referenced this issue May 27, 2021
This closes #484.
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.

3 participants