![]() $ (git log -min-parents=2 -pretty='format:%h %P' | I'm more interested in the conclusions and include code only for the curious. The ">" lines here are continuations the command is written in five lines total.Īll of the commands in this post are as I typed them into the terminal while experimenting, so they're not necessarily easy to read. Now, the obvious question: how big do these octopus merges get? Rails is probably more representative of the average project I expect that most git users don't know that octopus merges are even possible. $ git log -oneline -min-parents=3 | wc -lĪs a comparison point, 20% of all Rails commits are merges (12,401 out of 63,111), but it has zero octopus merges. (This is as of commit 566cf87, which is my current HEAD.) $ git log -oneline | wc -l Of the merges, 1,549 (3.3%) are octopus merges. There are 649,306 commits in the kernel's history. Octopuses are more common than you might expect. Having 30 merge commits, one after another, would be more confusing than a single 30-way merge, especially if that 30-way merge was conflict-free. Sometimes, a kernel maintainer needs to merge dozens of separate histories together at once. This seems strange for those of us who work on smaller projects: wouldn't a merge with three or four parents be confusing? Git also supports octopus merges, which have more than two parents. *- 53cd1ad Merge branch 'i2c/for-current' of. *- 2ad5d52 parisc: Don't use BITS_PER_LONG in use. It has two parents: 2c5d955 Merge branch 'parisc-4.10-3' of. We normally think of git merges as having two parent commits.įor example, the most recent Linux kernel merge as I write this is commit 2c5d955, which is part of the run-up to release 4.10-rc6.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |