|
|
|
|
|
by exceptione
132 days ago
|
|
> Imagine a commit in a patch series changes 100 lines. 99 of the lines are good, but the first round of review suggests to add a missing semicolon on one of the lines. The author does that by amending the existing commit, to avoid an unseemly "add missing semicolon" commit ending up in the project history. After a force-push (or new patch series submission), reviewers are generally presented with the full 100-line diff to review, because the tools don't understand that only one line changed since the last review.
In the PR-workflow, why not add fixup! commits? I think that when the PR is approved, the PR owner should be free to rewrite the history in their PR.Flirt looks interesting, but I am not sure if it would solve a real problem for me. |
|
1. Store the uncurated history of how the project was developed. 1 commit is created whenever a dev types 'git commit'.
2. Be a linear list of PRs / changes / whatever to a project. Each PR is created by squishing many commits together. It is associated with a conversation around code review, a ticket / issue and often some feature or bug.
Commits can't be both of these things at the same time, so we end up with unnecessary tooling like this.
The answer seems pretty obvious. Git just needs 2 separate mechanisms for these 2 different ideas. The obvious approach would be to leave commits as being atomic units of code change, and invent a new concept in git which represents a feature / feature branch. It would essentially just be a metadata object naming a set of commits, and it would have links to an issue tracker, CI results and code reviews.