summaryrefslogtreecommitdiff
path: root/commit.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-06-27 18:22:02 +0200
committerJunio C Hamano <gitster@pobox.com>2008-06-30 22:45:51 -0700
commit6a938648e1454842157b84408acbb6471ec6745f (patch)
tree0555ba653ff586e06abd2513fa0c53438b1ec733 /commit.h
parent5948e2ae27d936f7737f4d7433ca6c0b879fe4c8 (diff)
downloadgit-6a938648e1454842157b84408acbb6471ec6745f.tar.gz
Introduce get_merge_bases_many()
This introduces a new function get_merge_bases_many() which is a natural extension of two commit merge base computation. It is given one commit (one) and a set of other commits (twos), and computes the merge base of one and a merge across other commits. This is mostly useful to figure out the common ancestor when iterating over heads during an octopus merge. When making an octopus between commits A, B, C and D, we first merge tree of A and B, and then try to merge C with it. If we were making pairwise merge, we would be recording the tree resulting from the merge between A and B as a commit, say M, and then the next round we will be computing the merge base between M and C. o---C...* / . o---B...M / . o---o---A But during an octopus merge, we actually do not create a commit M. In order to figure out that the common ancestor to use for this merge, instead of computing the merge base between C and M, we can call merge_bases_many() with one set to C and twos containing A and B. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.h')
0 files changed, 0 insertions, 0 deletions