Skip to content

[FR] Git blame support #650

Description

@brendan-kellam

Support viewing git blame information when browsing code. I personally like GitKraken's approach of putting the blame information inline with the cursor.

Getting blame data

Got a prototype working here. Basically, we can use git blame -w -M -C --line-porcelain -L <start_line>,<end_line> <filename> to get blame information for a given range within a file. We then parse that into a data-structure we want, expose it over a api, and bingu bangu.

Rendering blame data

image.png

I do like how GitKraken renders blame information inline.

image.png

On hover over, we get a ton of data:

  • Author
  • Date of commit
  • GitHub issue / PR
  • Removed and added line (diff)
  • Commit SHA (hyperlinked)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions