-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
git: Append (You) to git blame author #21119
base: main
Are you sure you want to change the base?
git: Append (You) to git blame author #21119
Conversation
this commit suffixes (You) to the git blame author if `git config user.name` is same as author name `get_git_user_name` fetches user.name `for_path` method is modified to append (You) at the end of entry.author if author == username
Could you please include a screenshot of this change? |
Ah, right! I clicked but forgot to post 😝 |
Originally posted by @HarshNarayanJha in #10557 (comment) |
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’m personally not a fan of this. I think having the “You” is unnecessary and adds extra noise.
If we do want to add this, it will need to be behind a setting that is disabled by default.
That is what I suggested in the issue thread. I will add a config option under
with {
"git": {
"inline_blame": {
"author_format": "author"
}
}
} Being the default. I will suggest changing the format a little bit to better clarify things up. {
"git": {
"blame": {
"inline": {
"enabled": true,
"delay_ms": 500,
"show_commit_summary": true
}
"author_format": "author_you"
}
}
} |
…display`. It defines how to display the author in git blame displays. add new enum `GitAuthorDisplaySetting` with values `Author` (default), `You`, `AuthorYou` Author -> Simply the default behaviour, e.g. `Linus Torvalds` You -> Shows `You` inplace of author name on your machine. e.g. `You` AuthorYou -> Both e.g. `Linus Torvalds (You)` currently there is one issue. updating the setting doesn't reflect rendered blames. need to toggle inline blames to take effect.
So it seems like I can't read setting from the I had to go up to The repository receives that str from Now, here is the problem with the current implementation. The settings work as intended, default being the only author display. But changing the setting in the file doesn't update the blames immediately, but only after I toggle inline blame. I think this is because of how I read the setting. Please check @maxdeviant |
This commit suffixes (You) to the git blame author if
git config user.name
is same as author nameget_git_user_name
fetches user.name, behaviour is controlled by the settinggit.inline_blame.author_display
for_path
method is modified to replace author name with the appropriate string.Closes #10557
Release Notes:
git.inline_blame.author_display
My Commit shows as
... (You)
...Rest doesn't