Skip to content
GitLab Next
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 43,787
    • Issues 43,787
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,410
    • Merge requests 1,410
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.org
  • GitLabGitLab
  • Issues
  • #31423
Closed
Open
Created Aug 30, 2019 by Terry Davis@terrdavis

Support ignoring commits in blame (blame.ignoreRevsFile config option)

Problem to solve

I want to ignore commits when viewing blame (available as of git 2.23)

Intended users

Everyone except Buyers (and Product Managers?).

Further details

Use cases:

  1. Add a formatting tool to the project without breaking git blame.
  2. Perform minor refactorings (e.g. rename a variable) without affecting the blame.

Proposal

Add a new section in repository settings* to specify the file(s) pointed to by the config option1 normally specified blame.ignoreRevsFile, and UI toggles for config options blame.markUnblamables and blame.markIgnoredLines. The blame view then incorporates the algorithm implemented in git to re-assign blame to each line. UI options should include override toggles for the above specified blame.mark* flags, and there should be a UI hint that lets users know revisions are being ignored.

*If git is ever updated to include a default place to look for these settings that lives inside the repo, this feature should automatically activate, with an option to opt-out.

Permissions and Security

Only project owners/maintainers can specify these options at a project level. (Not 100% sure on this one...)

Documentation

Testing

  • The blame output of the git client should match gitlab's blame, given the same configuration.

(not sure how this would be implemented)

  • Risk: May need to reimplement git functionality. Updates to the reblaming algorithm would need to be tracked in this case.

What does success look like, and how can we measure that?

Users can see the same blame in the gitlab UI and the git client. More people would start converting projects to use auto-formatters.

Links / references

  1. https://git-scm.com/docs/git-config#Documentation/git-config.txt-blameignoreRevsFile ↩

Assignee
Assign to
Time tracking