diff options
author | Christian Halstrick <christian.halstrick@sap.com> | 2016-11-23 12:52:16 +0100 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2016-11-28 09:38:19 +0100 |
commit | 930cd43553388eefe8890de9ff21ad1d6328eda7 (patch) | |
tree | 5049a8b0cdd10fbbea69be0c82e9dd2c0f1d0a42 /.buckversion | |
parent | 0e31614ebec9050d0fdc987c8578f999b8d2ef60 (diff) | |
download | jgit-930cd43553388eefe8890de9ff21ad1d6328eda7.tar.gz jgit-930cd43553388eefe8890de9ff21ad1d6328eda7.zip |
Fix merge-base calculation
Fix JGits merge-base calculation in case of inconsistent commit times.
JGit was potentially failing to compute correct merge-bases when the
commit times where inconsistent (a parent commit was younger than a
child commit). The code in MergeBaseGenerator was aware of the fact that
sometimes the discovery of a merge base x can occur after the parents of
x have been seen (see comment in #carryOntoOne()). But in the light of
inconsistent commit times it was possible that these parents of a
merge-base have already been returned as a merge-base.
This commit fixes the bug by buffering all commits generated by
MergeBaseGenerator. It is expected that this buffer will be small
because the number of merge-bases will be small. Additionally a new
flag is used to mark the ancestors of merge-bases. This allows to filter
out the unwanted commits.
Bug: 507584
Change-Id: I9cc140b784c3231b972bd2c3de61a789365237ab
Diffstat (limited to '.buckversion')
0 files changed, 0 insertions, 0 deletions