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

Add in .git-blame-ignore-revs #351

Merged
merged 1 commit into from
May 11, 2021
Merged

Add in .git-blame-ignore-revs #351

merged 1 commit into from
May 11, 2021

Conversation

ckipp01
Copy link
Member

@ckipp01 ckipp01 commented May 11, 2021

Reformatting an entire project typically has the complaint that blame is
no longer useful. Thankfully, git has a solution for this. You can read
more about this here:

https://www.moxio.com/blog/43/ignoring-bulk-change-commits-with-git-blame

This .git-blame-ignore-revs file can be used to ensure that the
formatting commit is ignored when locally using git blame.

Reformatting an entire project typically has the complaint that blame is
no longer useful. Thankfully, git has a solution for this. You can read
more about this here:

https://www.moxio.com/blog/43/ignoring-bulk-change-commits-with-git-blame

This `.git-blame-ignore-revs` file can be used to ensure that the
formatting commit is ignored when locally using `git blame.`
@ckipp01 ckipp01 merged commit 910ee0d into scoverage:main May 11, 2021
@ckipp01 ckipp01 deleted the blame-ignore-refs branch May 11, 2021 13:40
ckipp01 added a commit to scoverage/scalac-scoverage-plugin that referenced this pull request May 13, 2021
I was going to wait to do this, but I was starting on something else in
here and I kept hitting format by habit since I'm honestly just used to
always having it. I think it's safe to say that most Scala developers
will be used to the default style that scalafmt gives you, so I'd like
to propose that we add this in along with scalafix to organize imports.

One huge concern is always that changes like this make it hard to get a
good `git blame`, however with modern git, this really isn't an issue
anymore. You can read more about his here:
https://www.moxio.com/blog/43/ignoring-bulk-change-commits-with-git-blame

I recently used the strategy outlined in that article in the
sbt-scoverage plugin:
scoverage/sbt-scoverage#351 and it seems to work
quite well.
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