Git Merge

How merging is handled in KEDEHub.

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
so we are talking about more than just git merge.

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:

  1. A developer made commit A in a fork of the base repository.
  2. The developer created a Pull Request 14635 for commit A.
  3. Mergify[bot] merged commit A from developer's cloned repo: "mvines:wt" into base repo "solana-labs:master" and created commit B.
  4. Mergify[bot] created a new branch "mergify/bp/v1.5/pr-14635" and a new commit C in it cherry picked from commit B.
  5. Mergify[bot] created a new Pull Request 14636 The comment reads "This is an automatic backport of pull request #14635 done by Mergify."
  6. Mergify[bot] created a new commit D by cherry pick from commit C.
  7. 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:

  1. A developer added 5 commits into developer's cloned repo: "CriesofCarrots:cli-single-gossip".
  2. The developer created a new Pull Request 14673 with 5 commits.
  3. 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".
  4. The developer deleted the cloned repo: "CriesofCarrots:cli-single-gossip".
  5. Mergify[bot] created a new commit B by cherry pick from commit A.
  6. Mergify[bot] created a new branch "mergify/bp/v1.5/pr-14673".
  7. Mergify[bot] created a new Pull Request 14676 The comment reads "This is an automatic backport of pull request #14673 done by Mergify."
  8. Mergify[bot] created a new commit C by cherry pick from commit A.
  9. Then Mergify[bot] deleted branch "mergify/bp/v1.5/pr-14673".
We are interested in the original contribution made by the developer. Hence of all the commits only A will be analyzed by KEDEHub.

References

1. Git Branching - Rebasing

Getting started