threads / discuss / 33290

patch series vs. multiple files changed in a commit; storytelling history vs. literal creation history

Subject: patch series vs. multiple files changed in a commit; storytelling history vs. literal creation history

## tl;dr

2 messages between Mar 26, 2013 and Mar 26, 2013.

replies: 1people: 2as markdown or json

Matt McClure· Mar 26, 2013, 21:21 UTC · lore

I've read Documentation/SubmittingPatches, followed some of the discussion on this list, and looked over some of the recent commit history. I'm impressed by the strong culture of review that produces readable patches and commit messages, but I think there are some gaps in my understanding of the prevailing process here.

Most of the code I've worked on has been closed source, and the commit histories tend to reflect what I'd call the literal "creation history". Reading the Git history, my impression is that it reflects a different "storytelling" history. In some cases, that might be the same as the creation history, but in general the emphasis is on telling a coherent story of the changes to the other developers rather than communicating all the messy details of how you arrived at the order of that story. Is that right?

What are the Git project's rules of thumb for when to create a patch series vs. putting changes to multiple files in a single commit/patch?

As a patch series evolves before landing on an upstream branch, do you typically make corrections to the original series in new commits, or update the respective commits from the original series in a new series of analogous commits?

-- 
Matt McClure
http://www.matthewlmcclure.com
http://www.mapmyfitness.com/profile/matthewlmcclure
Junio C Hamano· Mar 26, 2013, 22:03 UTC · re: Matt McClure · lore

Re: patch series vs. multiple files changed in a commit; storytelling history vs. literal creation history

Matt McClure <matthewlmcclure@gmail.com> writes:
Show 14 quoted lines
> I've read Documentation/SubmittingPatches, followed some of the
> discussion on this list, and looked over some of the recent commit
> history. I'm impressed by the strong culture of review that produces
> readable patches and commit messages, but I think there are some gaps
> in my understanding of the prevailing process here.
>
> Most of the code I've worked on has been closed source, and the commit
> histories tend to reflect what I'd call the literal "creation
> history". Reading the Git history, my impression is that it reflects a
> different "storytelling" history. In some cases, that might be the
> same as the creation history, but in general the emphasis is on
> telling a coherent story of the changes to the other developers rather
> than communicating all the messy details of how you arrived at the
> order of that story. Is that right?

We do not try to keep records of "oops, the previous was wrong" when we can easily tell the previous was wrong. Usually such a shallow mistake that can be spotted during the review is not worth keeping.

For example, the 4 patch series I posted today had three iterations of botched attempts that were never even published. I am sure other people do the same for their initial round for their patches, and any message on this list whose subject begins with "[PATCH vN X/Y]" for N > 2 are rewritten betterment based on list feedback.

Our history tends to become a coherent story because of this.

It is a different story for more involved changes that cook in 'next' for a while and then later turns out to have flaws. We update them with follow-up fixes and at that point, we do have records of mistakes. They often are tricky cases that are worth recording, as people can later make similar kinds of mistakes in other parts of the codebase.

The early part of the history back when Linus was running the show is somewhat different; you see more reverts and rewrites. But even back then, there were more experimental changes that were rewritten than the changes that were finally committed to the history.

← back to recent threads