git-blame
git-blame copied to clipboard
Show commit authors in different colors
As an enhancement, I think it could be nice to show every author in a different color so it's easier to recognise the different authors.
thanks @miguelcg i like this feature. I'd be happy to accept a pull request where this is an configurable option instead of the default commit color differentiation
I can work on this, feel free to assign it to me. Just a minor clarification, what do you mean by the default commit color differentiation? You mean the dark/light background of each row? Thanks
yes. right now the default logic is to make adjacent commits alternate dark / light regardless of author. its very subtle.
relevant code here: https://github.com/alexcorre/git-blame/blob/master/lib/util/BlameGutter.js#L106-L117
Thanks @alexcorre, I'll give it a go and see how it looks 😄
Do you like how it looks?
Since it's just a subtle way to distinguish different authors quickly and not colouring the whole cell, do you still want it as a configurable option or do you want to make it the default view?
not in love with the colors, can we grab some colors from the theme? i think there is a way to use color vars that are set by the theme? don't have time to look it up this second but i think this will help it to match whatever style the person has set up on their particular instance of atom
lets make it an option, but can default it to true
also...does it conflict with linter or git status indicators on the lines? Can you show a screenshot alongside that?
The colours are generated "uniquely" for each author based on its name (same name would always generate the same colour). I don't know about the color vars, I would have to investigate about it. I have to check if it conflicts with linter or git status indicators on the lines, I can't right now though.
This is how it looks with the default git status:
I haven't tried with the linter but it shouldn't interfere since the indicators are next to the line numbers instead of next to the commit authors.
great thanks for your help. go ahead and open a PR and i'll review the code