Repository navigation
Hold back generated output, and name files in commit subjects - #4
Merged
Merged
Conversation
Subjects were built from the directory, so a commit adding a parser and its test read "Add api" and told a reviewer nothing they could check. They now come from the file list: "Add cmd/parser.go and its test". Every subject is derived from the files and nothing else, which makes it a claim the commit can be held to rather than a label.
A dirty tree carries build output and caches as often as it carries work, and preen committed them because they were changes like any other. A __pycache__ directory landing in a commit is noise a reviewer has to read past and a file the project never wanted tracked. Generated paths are now held back and named at the approval prompt, with the pattern that caught each one, so the plan says what it declined to commit rather than quietly staging it. A project that keeps such a path on purpose says so in config, and --allow-generated turns the check off for one run.
The fixture wrote a shell script and ran it, which races the forks of every other parallel subtest: a child can still hold the write descriptor when the exec lands, and Linux answers ETXTBSY. One subtest in twenty failed with "text file busy" on CI and never on a developer's machine. The script is now handed to sh as an argument. sh is not a file these tests write, so there is no window to lose.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two changes that were sitting uncommitted. Split into one commit each, both
building and passing on their own.
Name the files a commit touches in its subject
Subjects were built from the directory, so a commit adding a parser and its test
read
Add api. That is a label, not a claim, and a reviewer cannot check itagainst anything. They now come from the file list:
Every subject is derived from the files and nothing else, which is what makes it
checkable against the commit it names.
Hold back generated output instead of committing it
A dirty tree carries build output and caches as often as it carries work, and
preen committed them because they were changes like any other. A
__pycache__directory landing in a commit is noise a reviewer reads past and a file the
project never wanted tracked.
Generated paths are now held back and named at the approval prompt, with the
pattern that caught each one:
The plan says what it declined to commit rather than quietly staging it. A project
that keeps such a path deliberately says so in config under
[generated], and--allow-generatedturns the check off for a single run.Notes
go-cmpis a new test dependency, sogo.modandgo.sumride with the subjectcommit, which is what needs them.
One imperfection worth naming: the README paragraph describing the new subjects
belongs with the subject commit and is in the generated-output commit instead. The
README hunks landed together when the two were separated, and splitting them
further was not worth rewriting the history for. Both land in the same merge.
Full suite passes, including the
runpackage hook tests that were failing beforethe test isolation fix on main.