Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] MissingObjectException during merge?

Hi,

I know the JGit merge algorithm quite well - so maybe I can help here.
It is not clear
to me how recursive merges are in the game here? You say that most of the time
it has been "caused by a recursive merge". What do you mean:
- are you merging together commits A and B and commit A happens to be the result
  of a recursive merge
- or are you merging together commits A and B and these commits have multiple
  merge-bases? This would require that we now do a recursive merge to
merge A and
  B together? And yes, JGit can't do recursives merges currently -
only resolve merges
  where A and B have exactly one merge base.

Independently from that the situation looks from the stack trace quite simple:
JGit merges together two commits with resolve merge strategy. It
iterates over the
files. It has found a file where he has to do a content merge. It has
determined the
three ids of contents needed. The content of the ours side, the
content of the theirs
side and the content in the merge base. But when asking the git
objectdatabase to for
these contents the database doesn't know one of these ids: Since I
don't know exactly what
JGit version you are running and since the current JGit version I have
doesn't match the
line numbers from the stack trace I would ask you to find out which of
the blobs he can't
load. Which of the three calls to getRawText() fail in
ResolveMerger.contentMerge()? Could you
then try to find out what is the objectID which can't be retrieved and
try with native git
"git show <objectid>" whether this id can be found by native git. Maybe a simple
call of "git fsck" in that repository already tells that there are
missing objects?

Ciao
  Chris


Back to the top