Skip to content

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.

1 participant