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

Hi Chris, thank you so much for your help.  Answers below.

On Thu, Jul 5, 2012 at 3:56 PM, Christian Halstrick
<christian.halstrick@xxxxxxxxx> wrote:
> 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.

Sorry if this caused confusion.  I only meant that most of the time I
see the issue in Gerrit with showing all files in a merge as added, it
is because the merge has multiple merge-bases (not the case here).

>
> 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

Gerrit (at current master) is using:
<jgitVersion>2.0.0.201206130900-r.23-gb3dbf19</jgitVersion>

> load. Which of the three calls to getRawText() fail in
> ResolveMerger.contentMerge()? Could you

This happens when trying to load the base text.

> 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

$ git show 07ae4988afdc18be170ec9ba1ccb2baafa73d2b3
fatal: bad object 07ae4988afdc18be170ec9ba1ccb2baafa73d2b3

> call of "git fsck" in that repository already tells that there are
> missing objects?

Everything looks reasonable here to me -
$ git fsck
dangling tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
dangling blob bb46232b4a8144a046ea2cd0497912696dc0e0c5
dangling blob 5bcc10c138f8f83597e68723e80a9368ce4f6ddf
dangling blob 4b8e6f9873a81769b2e1cc2e0c99985d1075cbfc
dangling blob f797fc18e78106988174bc00e5c6380197104e85
dangling blob f51a9f39b7bf7a77fb9c767931dbb195c4ca9f95
dangling blob 54dc00448c7bd2617bef6aad20a3a84d944178d8
dangling blob e0f3b34a0f40337d2d9594028772c42e8bc9d7ae
dangling blob db78bb1b4b6e00c3b38d2fb73a44ea06658816fc

Thanks again for the help, please let me know if there is anything
else I can do to figure out why this blob is missing or what else
could be going wrong.

Brad


>
> Ciao
>   Chris