BizHawk icon indicating copy to clipboard operation
BizHawk copied to clipboard

Add .git-blame-ignore-revs

Open CasualPokePlayer opened this issue 1 year ago • 5 comments

This could be used for ignoring giant whitespace changes in git blames. With this we could commit to doing giant tab/space + newline normalization in .cs files without blame noise. edit: and trailing newlines --yoshi The commit used here is used more for POC, although still nice for getting rid of the blame noise from it.

CasualPokePlayer avatar Aug 08 '22 10:08 CasualPokePlayer

GitHub doesn't respect this in file history (example). I still like this idea though.

YoshiRulz avatar Aug 10 '22 04:08 YoshiRulz

Well, this feature seems to be intended for git blame only; it works here: https://github.com/YoshiRulz/git-blame-ignore-revs-poc/blame/master/src/BizHawk.Client.EmuHawk/EmuHawkUtil.cs

Morilli avatar Aug 10 '22 23:08 Morilli

it works here

...or would, if the commit changed any lines in that file.

I've actually changed my mind and am now skeptical of this feature. How exactly does it "see beyond" the filtered commit(s)? Does it only try if the filter commit(s) are whitespace-only? In any case, I'd like to see it in action.

edit: Having reviewed the docs, it seems this has no downsides if we ensure it's only used for trivial whitespace changes. I'm still a bit disappointed that GitHub doesn't use this to glue file history together, but maybe there's another tool that does.

some more commits to consider: https://github.com/TASEmulators/BizHawk/commit/fec63fb66afe70a22cf328eecdaf09e37c21ada5 https://github.com/TASEmulators/BizHawk/commit/3ea71a2dda118b0cadd43c75ee6a577d01f5c6a9

YoshiRulz avatar Aug 15 '22 17:08 YoshiRulz

https://github.com/Morilli/BizHawk/blame/master/.editorconfig ... I think that's working?

Morilli avatar Aug 16 '22 23:08 Morilli