summaryrefslogtreecommitdiff
path: root/remote-testsvn.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2013-10-23 16:47:32 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-10-29 13:06:08 -0700
commitd96855ff517560650c62eca51a8bb78263f6a3ef (patch)
tree6fb9e42186c21d95b9c86af87eb8f8ed7a80d028 /remote-testsvn.c
parentmerge-base: use OPT_CMDMODE and clarify the command line parsing (diff)
downloadtgif-d96855ff517560650c62eca51a8bb78263f6a3ef.tar.xz
merge-base: teach "--fork-point" mode
The "git pull --rebase" command computes the fork point of the branch being rebased using the reflog entries of the "base" branch (typically a remote-tracking branch) the branch's work was based on, in order to cope with the case in which the "base" branch has been rewound and rebuilt. For example, if the history looked like this: o---B1 / ---o---o---B2--o---o---o---Base \ B3 \ Derived where the current tip of the "base" branch is at Base, but earlier fetch observed that its tip used to be B3 and then B2 and then B1 before getting to the current commit, and the branch being rebased on top of the latest "base" is based on commit B3, it tries to find B3 by going through the output of "git rev-list --reflog base" (i.e. Base, B1, B2, B3) until it finds a commit that is an ancestor of the current tip "Derived". Internally, we have get_merge_bases_many() that can compute this with one-go. We would want a merge-base between Derived and a fictitious merge commit that would result by merging all the historical tips of "base". When such a commit exist, we should get a single result, which exactly match one of the reflog entries of "base". Teach "git merge-base" a new mode, "--fork-point", to compute exactly that. Helped-by: Martin von Zweigbergk <martinvonz@gmail.com> Helped-by: John Keeping <john@keeping.me.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'remote-testsvn.c')
0 files changed, 0 insertions, 0 deletions