Skip to content

Docs: add CONTRIBUTING guideline against incidental reformatting/refactoring#1198

Merged
tamirdresher merged 3 commits into
bradygaster:devfrom
obit91:obit91/1197-contributing-scoped-changes
Jun 5, 2026
Merged

Docs: add CONTRIBUTING guideline against incidental reformatting/refactoring#1198
tamirdresher merged 3 commits into
bradygaster:devfrom
obit91:obit91/1197-contributing-scoped-changes

Conversation

@obit91

@obit91 obit91 commented May 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds an explicit Scoped Changes & Diff Hygiene section to CONTRIBUTING.md instructing contributors not to reformat, re-indent, change line endings, or refactor unrelated parts of a file when making a scoped change. Incidental formatting changes make a small edit appear as a whole-file rewrite, which makes review very hard and can hide the real change.

Background

This came up during work on #1196, where core.autocrlf=true normalized a file's committed line endings, rewriting every line and turning an ~18-line addition into a 122/104 diff until the endings were restored. This PR captures the general lesson so it doesn't recur.

Changes

  • New ## Scoped Changes & Diff Hygiene section in CONTRIBUTING.md covering:
    • Keep changes scoped to relevant lines
    • Don't reformat/refactor unrelated content
    • Preserve existing line endings (core.autocrlf caveat + .gitattributes guidance)
    • Split genuine reformats into dedicated PRs
    • Sanity-check git diff --stat / --numstat before pushing

Scope

  • Documentation only (CONTRIBUTING.md). No product source changes, so no changeset required.
  • The diff is intentionally clean: 10 insertions, 0 deletions — practicing what it preaches.

Closes #1197

Add a 'Scoped Changes & Diff Hygiene' section to CONTRIBUTING.md instructing
contributors to keep changes scoped, avoid incidental reformatting/refactoring
of unrelated content, preserve existing line endings (core.autocrlf caveat),
split genuine reformats into dedicated PRs, and sanity-check the diff before
pushing.

Closes bradygaster#1197

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@obit91 obit91 marked this pull request as ready for review May 30, 2026 18:41
Copilot AI review requested due to automatic review settings May 30, 2026 18:41
Copilot AI added 2 commits June 5, 2026 21:56
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@tamirdresher tamirdresher merged commit 0ebdb30 into bradygaster:dev Jun 5, 2026
6 checks passed
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.

Docs: add CONTRIBUTING guideline against incidental reformatting/refactoring of existing files

3 participants