mongodb / specifications

Specifications related to MongoDB
http://specifications.readthedocs.io/en/latest
Other
389 stars 242 forks source link

Add .git-blame-ignore-revs #1532

Closed katcharov closed 7 months ago

katcharov commented 7 months ago

See:

This ignores some reformatting commits arising from DRIVERS-2789 when viewing git blame on GitHub and in other tools. Tested auth.md in IntelliJ.

Blame before, note most lines attributed to the Sync with 4b7d757 commit.

Blame after (as of this change). In some cases, tools do not identify the correct commit.

eramongodb commented 7 months ago

I'd like to defer my explicit approval/disapproval until more feedback is given by other reviewers. However, I lean towards disapproval (rejecting proposed changes in this PR).

To reiterate my comments from external discussion in short summary, I would rather deal with the presence of the Markdown conversion and the "Sync with" commits in the line-based git blame history over allowing for the possibility of misleading git blame line-to-commit attribution resulting from the use of --ignore-rev on commits with significant change in content. The conversion from reStructuredText to Markdown alone is significant enough for me to be reluctant to ignoring them. The inclusion of "Sync with" commits that restore git blame history, which may also contain important spec changes (e.g. https://github.com/mongodb/specifications/commit/a2886304afb006cc39808cd67a3503cc1b221116) unrelated to Markdown conversion, further strengthens my reluctance.

Examples of the concerning line-based git blame behavior with ignored refs include (note: use of ~ suffix for hash in URL to disable ignoring revs):

I recommend other reviewers examine the quality of line-based git blame history of affected files when considering the proposed changes in this PR.

blink1073 commented 7 months ago

I agree with @eramongodb's assessment.

katcharov commented 7 months ago

Alright, I'll close this PR. (The file can at least be applied locally.)