There's no way to handle tab/space-mixed indentation of CRuby's C code properly in VSCode. It impacts the productivity of the VSCode users a lot, including myself.
https://bugs.ruby-lang.org/issues/16112 touched this topic before, but we haven't discussed --ignore-revs-file so much. I also didn't know VSCode still can't deal with it in 2022 (as I've been using Vim).
(2) seems very obviously the way, and it's amazing it has not been done yet.
This is the #1 problem for new (and some of the existing as well) contributors to CRuby..
If CRuby does not do this, it is explicitly rejecting new contributors for no good reasons.
(IMHO mixing spaces and tabs has no sense nowadays, it's an antique legacy non-sense practice with zero advantages, and there is no valid reason to keep that monster alive)
It might be a bit difficult to find out which C files shouldn't be a target.
I noticed ruby-commit-hook/bin/auto-style.rb already knows about this. (2) doesn't have any blocker.
So I prepared a pull request: https://github.com/ruby/ruby/pull/6094. I confirmed GitHub ignores it just fine. If you have git config --global blame.ignoreRevsFile .git-blame-ignore-revsgit config blame.ignoreRevsFile .git-blame-ignore-revs, git blame ignores it properly too. I'm inclined to move forward with this unless somebody has a problem with leaving such a commit.
If CRuby does not do this, it is explicitly rejecting new contributors for no good reasons.
I want to use VSCode, but this expression is not correct in my perspective. VSCode is explicitly rejecting new users who have been working on any project with emacs-style indentation.
If you have git config --global blame.ignoreRevsFile .git-blame-ignore-revs, git blame ignores it properly too.
Unfortunately you can't set it at the global level because git blame fails if the file does not exist, and that would cause issues when working on other repos (see this discussion in the Git mailing list). But you can definitely add it as a config local to the repo, and mention how to do that at the top of the file itself.
I would also recommend setting these two configs which can help in case the ignored revisions end up hiding the origin of a line: blame.markUnblamableLines and blame.markIgnoredLines. Looking at the output of git blame at least you'll see that a revision was ignored. These two can be set at the global level.
Unfortunately you can't set it at the global level because git blame fails if the file does not exist, and that would cause issues when working on other repos
Right, I noticed that behavior after writing the comment but forgot to update the comment about it. I corrected the comment to not use --global, which would write .git/config. Given that you could always use ~/.gitconfig or .git/config for your original git configuration, I guess it's fair to just commit .gitconfig to the repository. I'll add that once I merge it. (edit: I noticed committing .gitconfig doesn't work and you'd need to do something in .git/config like including it anyway) I'll leave a comment about it in .git-blame-ignore-revs. Hopefully, you wouldn't need to initialize your repository so often.
I would also recommend setting these two configs which can help in case the ignored revisions end up hiding the origin of a line: blame.markUnblamableLines and blame.markIgnoredLines.
Good to know. I guess the change of this time doesn't introduce new lines, but I'll consider adding that when I see something weird that can be solved by that.