Support git-blame-ignore-revs file #11405

Closed
opened 2025-11-02 09:36:47 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @TobiX on GitHub (Aug 4, 2023).

Feature Description

Git has the option to ignore specific revisions in its blame view. This is e.g. useful for hiding automatic refactorings or bulk-reformattings from the history (https://git-scm.com/docs/git-config#Documentation/git-config.txt-blameignoreRevsFile). It would be nice if Gitea would honour such file(s) in its blame view.

While there is no "standard" file name for a repository-wide file for this feature, the name .git-blame-ignore-revs has been adopted by most projects (and is supported by GitHub):

GitLab would also use that filename when implementing this feature:

As an example, here is a blame view which uses the file:

Screenshots

grafik

Originally created by @TobiX on GitHub (Aug 4, 2023). ### Feature Description Git has the option to ignore specific revisions in its blame view. This is e.g. useful for hiding automatic refactorings or bulk-reformattings from the history (https://git-scm.com/docs/git-config#Documentation/git-config.txt-blameignoreRevsFile). It would be nice if Gitea would honour such file(s) in its blame view. While there is no "standard" file name for a repository-wide file for this feature, the name `.git-blame-ignore-revs` has been adopted by most projects (and is supported by GitHub): - https://moxio.com/blog/ignoring-bulk-change-commits-with-git-blame/ - https://docs.github.com/en/repositories/working-with-files/using-files/viewing-a-file#ignore-commits-in-the-blame-view - https://github.blog/changelog/2022-03-24-ignore-commits-in-the-blame-view-beta/ - https://www.stefanjudis.com/today-i-learned/how-to-exclude-commits-from-git-blame/ GitLab would also use that filename when implementing this feature: - https://gitlab.com/gitlab-org/gitlab/-/issues/31423 - https://gitlab.com/gitlab-org/gitaly/-/merge_requests/4177 As an example, here is a blame view which uses the file: - https://github.com/apache/maven/blame/master/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java ### Screenshots ![grafik](https://github.com/go-gitea/gitea/assets/78534/e85c4e9d-4ce6-4676-9c9d-87c8a47c96b3)
GiteaMirror added the type/proposal label 2025-11-02 09:36:47 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#11405