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(blame): Support custom rev_opts for blame #1485

Merged
merged 1 commit into from
Aug 31, 2022

Commits on Aug 31, 2022

  1. feat(blame): Support custom rev_opts for blame

    The `git blame` CLI offers a repeated `-C` option that can be used to detect
    lines that move within/between files. While a slower operation, it yields more
    accurate authorship reports.
    https://git-scm.com/docs/git-blame#Documentation/git-blame.txt--Cltnumgt
    
    While GitPython does enable passing custom kwargs to the command line `git`
    invocation, the fact that kwargs is a dictionary (i.e. no duplicate keys) means
    that there was no way to request the `-C` option in `git blame` more than once.
    
    This commit adds an optional `rev_opts` parameter to the `blame` method which
    accepts a list of strings to propagate to the CLI invocation of `git blame`. By
    using a `List[str]` for `rev_opts`, users of GitPython can pass now the `-C`
    option multiple times to get more detailed authorship reports from `git blame`.
    thehale committed Aug 31, 2022
    Configuration menu
    Copy the full SHA
    18a79d8 View commit details
    Browse the repository at this point in the history