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

doc: contribute: distinguish renaming new versus old files #84177

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions doc/contribute/contributor_expectations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,17 @@ PR Requirements

5. Renaming and Code Rewrites

If files or code are renamed or rewritten in later commits during development, squash or rewrite
earlier commits to reflect the final structure. This ensures that:
If new files are renamed or new code rewritten in later commits during development, squash or
rewrite earlier commits to reflect the final structure. This ensures that:

* The history remains clean and easy to follow.
* Bisectability is preserved by eliminating redundant renaming or partial rewrites.

Note renaming and changing code *older* than the Pull Request is a different situation. To
help git rename detection heuristics, it's better to minimize changes to code that is being
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just note that this helps reviewers rather than git.

moved and use distinct commits if possible. In every situation, preserve bisectability and
prioritize readability of the git log.

6. Attribution of Authorship

While cleaning up the commit history, ensure that authorship attribution remains accurate.
Expand Down
Loading