Merge in general
The process of incorporating source code changes is known as software merging.
Merge machinery in Git
The merge machinery in git (called merge-recursive) powers several aspects of git:
- merge
- cherry-pick
- rebase
- revert
- am -3
- stash
- checkout -m
Merge in KEDEHub
Merge commits, which integrate changes from multiple branches, have more than one parent.
if branch A is merged into branch B, the first parent of the merge commit would be the one that branch B was pointing to before the merge.
All contributions are available in the parent commits. Since we are interested in the contributions not in commits per se, KEDEHub doesn't process merged commits.
Merge one commit from another repository
"Mergify[bot]" is a product of Mergify
Here are the steps chronologically:
- A developer made commit A in a fork of the base repository.
- The developer created a Pull Request 14635 for commit A.
- Mergify[bot] merged commit A from developer's cloned repo: "mvines:wt" into base repo "solana-labs:master" and created commit B.
- Mergify[bot] created a new branch "mergify/bp/v1.5/pr-14635" and a new commit C in it cherry picked from commit B.
- Mergify[bot] created a new Pull Request 14636 The comment reads "This is an automatic backport of pull request #14635 done by Mergify."
- Mergify[bot] created a new commit D by cherry pick from commit C.
- Then Mergify[bot] deleted branch "mergify/bp/v1.5/pr-14635".
We are interested in the original contribution made by a developer. Hence of all three commits A, B, C and D only B will be analyzed by KEDEHub.
Merge many commits from another repository
"Mergify[bot]" is a product of Mergify
Here are the steps chronologically:
- A developer added 5 commits into developer's cloned repo: "CriesofCarrots:cli-single-gossip".
- The developer created a new Pull Request 14673 with 5 commits.
- The developer merged the 5 commits from developer's cloned repo: "CriesofCarrots:cli-single-gossip" into one new commit A into base repository "solana-labs:master".
- The developer deleted the cloned repo: "CriesofCarrots:cli-single-gossip".
- Mergify[bot] created a new commit B by cherry pick from commit A.
- Mergify[bot] created a new branch "mergify/bp/v1.5/pr-14673".
- Mergify[bot] created a new Pull Request 14676 The comment reads "This is an automatic backport of pull request #14673 done by Mergify."
- Mergify[bot] created a new commit C by cherry pick from commit A.
- Then Mergify[bot] deleted branch "mergify/bp/v1.5/pr-14673".
References
Getting started