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

feat: support git blame -C option #953

Closed
wants to merge 1 commit into from

Conversation

andrhua
Copy link

@andrhua andrhua commented Mar 11, 2024

Adds support for -C/-CC/-CCC option for current line blame

-C[<num>]
           In addition to -M, detect lines moved or copied from other files that were modified in the same commit. This is useful
           when you reorganize your program and move code around across files. When this option is given twice, the command
           additionally looks for copies from other files in the commit that creates the file. When this option is given three times,
           the command additionally looks for copies from other files in any commit.

           <num> is optional but it is the lower bound on the number of alphanumeric characters that Git must detect as
           moving/copying between files for it to associate those lines with the parent commit. And the default value is 40. If there
           are more than one -C options given, the <num> argument of the last -C will take effect.

Code doesn't check for -CCCC, but since git blame itself accepts such option, I think it's better to keep gitsigns code simpler.

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 this pull request may close these issues.

None yet

1 participant