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

Support git-blame-ignore-revs file #26329

Closed
TobiX opened this issue Aug 4, 2023 · 0 comments · Fixed by #26395
Closed

Support git-blame-ignore-revs file #26329

TobiX opened this issue Aug 4, 2023 · 0 comments · Fixed by #26395
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@TobiX
Copy link

TobiX commented 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

@TobiX TobiX added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label Aug 4, 2023
KN4CK3R added a commit that referenced this issue Sep 16, 2023
Closes #26329

This PR adds the ability to ignore revisions specified in the
`.git-blame-ignore-revs` file in the root of the repository.


![grafik](https://github.com/go-gitea/gitea/assets/1666336/9e91be0c-6e9c-431c-bbe9-5f80154251c8)

The banner is displayed in this case. I intentionally did not add a UI
way to bypass the ignore file (same behaviour as Github) but you can add
`?bypass-blame-ignore=true` to the url manually.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant