Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Missing unknown when doing pull(Missing unknown when doing pull)
Missing unknown when doing pull [message #1463304] Thu, 06 November 2014 12:28 Go to next message
Mattias Andersson is currently offline Mattias AnderssonFriend
Messages: 23
Registered: April 2013
Junior Member
Hi,

We often get Missing unknown exception when pulling from remote repository in EGit (Note this do not happen with native git). We are using Eclipse Luna on Windows and I tried both 3.5.[0,1] and the 3.6.0).

Our repository contains one sub module (used as a lib so no changes will ever be done on this sub-module).

The missing commit in the stack trace below is a commit from the sub-module. I have tried to do a fetch from upstream on the sub-module to make sure the sub-module is up-to-date before pulling but that doesn't help? So when this happens we use native git and it always works.

Anyone having the same problem? Should I file a EGit/JGit bug? Any workarounds?

Br,
/Mattias

org.eclipse.jgit.api.errors.JGitInternalException: Exception caught during execution of merge command. org.eclipse.jgit.errors.MissingObjectException: Missing unknown 22175d544e9a5f7f0c9a2f9918cf385cf6b47b03
at org.eclipse.jgit.api.MergeCommand.call(MergeCommand.java:413)
at org.eclipse.jgit.api.PullCommand.call(PullCommand.java:322)
at org.eclipse.egit.core.op.PullOperation$1.run(PullOperation.java:97)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)
at org.eclipse.egit.core.op.PullOperation.execute(PullOperation.java:128)
at org.eclipse.egit.ui.internal.pull.PullOperationUI.execute(PullOperationUI.java:139)
at org.eclipse.egit.ui.internal.pull.PullOperationUI$1.runInWorkspace(PullOperationUI.java:114)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.eclipse.jgit.errors.MissingObjectException: Missing unknown 22175d544e9a5f7f0c9a2f9918cf385cf6b47b03
at org.eclipse.jgit.internal.storage.file.WindowCursor.open(WindowCursor.java:148)
at org.eclipse.jgit.lib.ObjectReader.open(ObjectReader.java:229)
at org.eclipse.jgit.dircache.DirCacheCheckout.checkoutEntry(DirCacheCheckout.java:1201)
at org.eclipse.jgit.merge.ResolveMerger.checkout(ResolveMerger.java:316)
at org.eclipse.jgit.merge.ResolveMerger.mergeTrees(ResolveMerger.java:1048)
at org.eclipse.jgit.merge.ResolveMerger.mergeImpl(ResolveMerger.java:303)
at org.eclipse.jgit.merge.Merger.merge(Merger.java:203)
at org.eclipse.jgit.merge.Merger.merge(Merger.java:156)
at org.eclipse.jgit.merge.ThreeWayMerger.merge(ThreeWayMerger.java:114)
at org.eclipse.jgit.api.MergeCommand.call(MergeCommand.java:342)
... 8 more
Re: Missing unknown when doing pull [message #1463369 is a reply to message #1463304] Thu, 06 November 2014 14:00 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1032
Registered: July 2009
Senior Member
Which git server are you using ?

If it's based on JGit you need to ensure that JGit 3.5.1 is used both on server and client side.
For the details see the discussion on the mailing list https://dev.eclipse.org/mhonarc/lists/egit-dev/msg03645.html
Re: Missing unknown when doing pull [message #1463377 is a reply to message #1463304] Thu, 06 November 2014 14:05 Go to previous messageGo to next message
Christian Halstrick is currently offline Christian HalstrickFriend
Messages: 256
Registered: July 2009
Senior Member
In the last weeks I saw multiple occurences of MissingObjectException (e.g. http://dev.eclipse.org/mhonarc/lists/egit-dev/msg03582.html). But your case is maybe different. You don't get the exception during transport but during a merge which happens after a successful transport. Could you please do the following: instead of a pull just do only a fetch. Afterwards use the commandline, cd to the root of the working tree and issue "git fsck" and attach the result. I guess that your repo contains an inconsistency either due to the fetch or even there before.

Ciao
Chris
Re: Missing unknown when doing pull [message #1463400 is a reply to message #1463304] Thu, 06 November 2014 14:25 Go to previous messageGo to next message
Mattias Andersson is currently offline Mattias AnderssonFriend
Messages: 23
Registered: April 2013
Junior Member
We are running git server on linux:

[cm@puh$]git --version
[cm@puh$]git version 1.7.1

[cm@puh$] uname -a
Linux puh 2.6.32-431.3.1.el6.x86_64 #1 SMP Fri Jan 3 21:39:27 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

On the windows clients we use:

$ git --version
git version 1.9.0.msysgit.0

I have done multiple pulls/pushes and used git native to work around the problem since the error occurred but here is the result of git fsck from the repository.

$ git fsck
Checking object directories: 100% (256/256), done.
Checking objects: 100% (23456/23456), done.
dangling blob 25070d8de8a46bb6ecb9743226a3ccfd3f9c4eb9
dangling blob 891759570dfcc4f7caad964f117541650d36da5f
dangling blob 5540fcb7c70a6e65dd84979475f4d37deb970a86
dangling blob 3948073ed71f26356fb8a6624ca9bd3490a10b6c
dangling blob 19503ace2b94367aa89d72fe378e919d42218907
dangling blob 955dbc4fd0eadf3dc3f240b38add34de35dfc835
dangling blob 626698ef58ee19745854aa9aa1f0ef530e148de0
dangling blob 9a778639fcec18f75defd8e97ecf611a50cdd33b
dangling blob 15798ef892ab4836778250974878976db42bbb3c
dangling blob d9a083a74430e6ebb9bc00f4b62c8db55d36f066
dangling blob e9a00503e8340553956558acc15bbb3176bd730c
dangling blob deb172d9cfb8694e731ed761b453c32da8fac461
dangling blob 16bf853c8322b8d147e695846266ba2754ef03a3
dangling blob 2fbf30a6b667186b398ee5cfd2c2cffc8299c133
dangling blob bae84e3e553e86dc55f182436cda9761c31cc9d8

I can do some fetch from Eclipse, git fsck and EGit merge when using this repository if that would help (for a while).

The exception doesn't happen every time unfortunately.

Br,
/Mattias




Re: Missing unknown when doing pull [message #1464076 is a reply to message #1463400] Fri, 07 November 2014 06:40 Go to previous messageGo to next message
Christian Halstrick is currently offline Christian HalstrickFriend
Messages: 256
Registered: July 2009
Senior Member
Thats complicated. If the problem doesn't happen reproducable then I don't have a good clue. I need a fsck on the client repo directly after a failing fetch, pull.
- Is the fsck output you attached of that kind?
- If the pull fails with EGit is this situation stable. Will the pull from EGit always fail or will it eventually succeed if you retry it


Ciao
Chris
Re: Missing unknown when doing pull [message #1464104 is a reply to message #1464076] Fri, 07 November 2014 07:21 Go to previous messageGo to next message
Mattias Andersson is currently offline Mattias AnderssonFriend
Messages: 23
Registered: April 2013
Junior Member
Hi,

I realize that it not easy for you to help. The fsck was not directly after the error occurred unfortunately. But I will try to reproduce such a case and do a fsck after a fetch. I think that the pull will fail forever but we usually just do git native directly so I'm not 100% sure.

I try to give you some more information to work with. Thanks for the help so far!

Br,
/Mattias
Re: Missing unknown when doing pull [message #1468415 is a reply to message #1464076] Mon, 10 November 2014 20:52 Go to previous messageGo to next message
Mattias Andersson is currently offline Mattias AnderssonFriend
Messages: 23
Registered: April 2013
Junior Member
Hi Christian,

I have now managed to reproduce the problem and it looks to me that EGit/JGit failes to handle merging the submodule commit. Here is the logs that I collected. The git fsck is after Fetch from upstream. After doing Fetch from upstream I did a Pull and I got the exception. The commit that I think EGit/JGit fails to merge is the submodule commit. And even if a do a Fetch From upstream on the submodule before I pull I still get the error. The repository is in state MERGING after the error and I can't get out of that without doing a Reset hard. Pull again gives the same error. So I guess I can't recover from it.

A 'git pull origin master' using git native just works

$ git pull origin master
From ssh://git:22/home/git/customers/xxxx
* branch master -> FETCH_HEAD
Merge made by the 'recursive' strategy.
xxxx/git-targets.xml | 2 +-
xxxx/lib-core | 2 +-
.../4.6.6_to_4.6.7/CUSTSPECIFIC_SYS_PARAM_DATA.sql | 22 +++++++++++
.../custspecific/xxxx/Setup.java | 32 +++++++++++++++
.../xxxx/servmgmt/FamilyPackageValidator.java | 46 +++++++++++++++-------
.../servmgmt/MobileSubscriptionValidator.java | 26 +++---------
.../xxxx/ws/WsAPILib.java | 2 +-
7 files changed, 95 insertions(+), 37 deletions(-)

If there are any more information that you need to help figuring out whats going on just let me know.

Br,
/Mattias

Exception caught during execution of merge command. org.eclipse.jgit.errors.MissingObjectException: Missing unknown 6727db6797e33376a612f5d60c3f0b9cbb9c63bf
Exception caught during execution of merge command. org.eclipse.jgit.errors.MissingObjectException: Missing unknown 6727db6797e33376a612f5d60c3f0b9cbb9c63bf

$ git fsck
Checking object directories: 100% (256/256), done.
Checking objects: 100% (23785/23785), done.
dangling blob 25070d8de8a46bb6ecb9743226a3ccfd3f9c4eb9
dangling blob 891759570dfcc4f7caad964f117541650d36da5f
dangling blob 3948073ed71f26356fb8a6624ca9bd3490a10b6c
dangling blob 19503ace2b94367aa89d72fe378e919d42218907
dangling blob 955dbc4fd0eadf3dc3f240b38add34de35dfc835
dangling blob 626698ef58ee19745854aa9aa1f0ef530e148de0
dangling blob 9a778639fcec18f75defd8e97ecf611a50cdd33b
dangling blob d9a083a74430e6ebb9bc00f4b62c8db55d36f066
dangling blob e9a00503e8340553956558acc15bbb3176bd730c
dangling blob 2fbf30a6b667186b398ee5cfd2c2cffc8299c133
dangling blob bae84e3e553e86dc55f182436cda9761c31cc9d8

org.eclipse.jgit.api.errors.JGitInternalException: Exception caught during execution of merge command. org.eclipse.jgit.errors.MissingObjectException: Missing unknown 6727db6797e33376a612f5d60c3f0b9cbb9c63bf
at org.eclipse.jgit.api.MergeCommand.call(MergeCommand.java:413)
at org.eclipse.jgit.api.PullCommand.call(PullCommand.java:322)
at org.eclipse.egit.core.op.PullOperation$1.run(PullOperation.java:97)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)
at org.eclipse.egit.core.op.PullOperation.execute(PullOperation.java:128)
at org.eclipse.egit.ui.internal.pull.PullOperationUI.execute(PullOperationUI.java:139)
at org.eclipse.egit.ui.internal.pull.PullOperationUI$1.runInWorkspace(PullOperationUI.java:114)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.eclipse.jgit.errors.MissingObjectException: Missing unknown 6727db6797e33376a612f5d60c3f0b9cbb9c63bf
at org.eclipse.jgit.internal.storage.file.WindowCursor.open(WindowCursor.java:148)
at org.eclipse.jgit.lib.ObjectReader.open(ObjectReader.java:229)
at org.eclipse.jgit.dircache.DirCacheCheckout.checkoutEntry(DirCacheCheckout.java:1201)
at org.eclipse.jgit.merge.ResolveMerger.checkout(ResolveMerger.java:316)
at org.eclipse.jgit.merge.ResolveMerger.mergeTrees(ResolveMerger.java:1048)
at org.eclipse.jgit.merge.ResolveMerger.mergeImpl(ResolveMerger.java:303)
at org.eclipse.jgit.merge.Merger.merge(Merger.java:203)
at org.eclipse.jgit.merge.Merger.merge(Merger.java:156)

diff --git a/xxxx/lib-core b/xxxx/lib-core
index 480d525..6727db6 160000 (submodule)
--- a/xxxx/lib-core
+++ b/xxxx/lib-core
@@ -1 +1 @@
-Subproject commit 480d52575e96ebc88018f650d60526d4268ccbf3
+Subproject commit 6727db6797e33376a612f5d60c3f0b9cbb9c63bf
Re: Missing unknown when doing pull [message #1468596 is a reply to message #1468415] Tue, 11 November 2014 00:20 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1032
Registered: July 2009
Senior Member
Could you retry using the latest nightly build from http://download.eclipse.org/egit/updates-nightly ?
We did a couple of fixes for submodule support recently.
Re: Missing unknown when doing pull [message #1469035 is a reply to message #1468596] Tue, 11 November 2014 08:44 Go to previous messageGo to next message
Mattias Andersson is currently offline Mattias AnderssonFriend
Messages: 23
Registered: April 2013
Junior Member
Hi,

I actually used a nightly build ( a couple of weeks old) when doing the test (it happens with 3.5.x versions as well) . I'm updating to the latest nightly as I'm typing this and I'll try to reproduce.

Br,
/Mattias
Re: Missing unknown when doing pull [message #1469615 is a reply to message #1468596] Tue, 11 November 2014 19:18 Go to previous messageGo to next message
Mattias Andersson is currently offline Mattias AnderssonFriend
Messages: 23
Registered: April 2013
Junior Member
Hi Matthias,

I can reproduce the exact same error with: EGit/JGit 3.6.0.201411100028

It happens every time we update the submodule and user are pulling that change from the remote repository into there local repositories. Usually there are more commits other than the submodule commit that is pulled, and that was the case here (one more commit).

The stack trace was the same:

org.eclipse.jgit.api.errors.JGitInternalException: Exception caught during execution of merge command. org.eclipse.jgit.errors.MissingObjectException: Missing unknown 284176f46f98029563eba1bcf68642ac8420cff5
at org.eclipse.jgit.api.MergeCommand.call(MergeCommand.java:413)
at org.eclipse.jgit.api.PullCommand.call(PullCommand.java:322)
at org.eclipse.egit.core.op.PullOperation$1.run(PullOperation.java:97)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)
at org.eclipse.egit.core.op.PullOperation.execute(PullOperation.java:128)
at org.eclipse.egit.ui.internal.pull.PullOperationUI.execute(PullOperationUI.java:139)
at org.eclipse.egit.ui.internal.pull.PullOperationUI$1.runInWorkspace(PullOperationUI.java:114)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.eclipse.jgit.errors.MissingObjectException: Missing unknown 284176f46f98029563eba1bcf68642ac8420cff5
at org.eclipse.jgit.internal.storage.file.WindowCursor.open(WindowCursor.java:148)
at org.eclipse.jgit.lib.ObjectReader.open(ObjectReader.java:229)
at org.eclipse.jgit.dircache.DirCacheCheckout.checkoutEntry(DirCacheCheckout.java:1201)
at org.eclipse.jgit.merge.ResolveMerger.checkout(ResolveMerger.java:316)
at org.eclipse.jgit.merge.ResolveMerger.mergeTrees(ResolveMerger.java:1048)
at org.eclipse.jgit.merge.ResolveMerger.mergeImpl(ResolveMerger.java:303)
at org.eclipse.jgit.merge.Merger.merge(Merger.java:203)
at org.eclipse.jgit.merge.Merger.merge(Merger.java:156)
at org.eclipse.jgit.merge.ThreeWayMerger.merge(ThreeWayMerger.java:114)
at org.eclipse.jgit.api.MergeCommand.call(MergeCommand.java:342)
... 8 more

Please let me know if there are anything else I can do give you a better understanding on what is going on.

Br,
/Mattias



Re: Missing unknown when doing pull [message #1471124 is a reply to message #1469615] Wed, 12 November 2014 22:32 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1032
Registered: July 2009
Senior Member
You are using a pretty old version of git on the server, could you retry with a more recent version ?
Re: Missing unknown when doing pull [message #1471606 is a reply to message #1471124] Thu, 13 November 2014 07:51 Go to previous messageGo to next message
Mattias Andersson is currently offline Mattias AnderssonFriend
Messages: 23
Registered: April 2013
Junior Member
Hi,

We have scheduled an update of the git-server so I'll try to reproduce this again when that is done.

Br,

/Mattias
Re: Missing unknown when doing pull [message #1480473 is a reply to message #1471124] Thu, 20 November 2014 07:59 Go to previous messageGo to next message
Mattias Andersson is currently offline Mattias AnderssonFriend
Messages: 23
Registered: April 2013
Junior Member
Hi Matthias,

I can actually recreate this without using a remote git server. The instructions could probably be better but this is what I did.

Create git rep that is going to be our submodule:
----------------------------------------
1) Create a bare repository lib.git
2) Clone lib.git to lib2.git
3) Add lib.jar to lib2.git and add/commit/push to origin master (lib.git)
4) Tag lib2.git ('VERSION_01')
5) Push tag to origin master (lib.git)

Create a main git repository
----------------------------------------
1) Create a bare repository a.git
2) In Eclipse clone a.git to a2.git
3) Create a java project and add it to the a2.git. Push to a.git
4) Add lib.git as submodule to a2.git (under directory lib). Push to a.git

Now we have a git repository with a submobule.

1) In lib2.git add a file lib2.jar. add/commit/push to origin master (lib.git)
2) Tag lib2.git ('VERSION_02')
3) Push tag to lib.git

Now we simulate that some else is doing changes to a.git

1) clone a.git to a3.git
2) git pull origin master
3) git submodule init
4) git submodule update
5) cd lib
6) git fetch --tags origin master
7) git checkout VERSION_02
Cool cd ..
9) git add .
10) git commit -m="updated a to version 02"
11) git push origin master

In Eclipse
1) In a2.git repository do a git pull
2) This will cause: Exception caught during execution of merge command. org.eclipse.jgit.errors.MissingObjectException

I hope this can help you reproduce and perhaps find the error.

Br,

/Mattias
Re: Missing unknown when doing pull [message #1480602 is a reply to message #1480473] Thu, 20 November 2014 10:09 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1032
Registered: July 2009
Senior Member
thanks for this detailed example, will try to reproduce it
Re: Missing unknown when doing pull [message #1587424 is a reply to message #1480602] Tue, 27 January 2015 10:35 Go to previous messageGo to next message
Mattias Andersson is currently offline Mattias AnderssonFriend
Messages: 2
Registered: January 2015
Junior Member
Hi Matthias,

Have you been able to reproduce this problem? If not is there anything else I could do to help you out?

Br,
/Mattias
Re: Missing unknown when doing pull [message #1623960 is a reply to message #1587424] Thu, 19 February 2015 12:57 Go to previous messageGo to next message
Christian Halstrick is currently offline Christian HalstrickFriend
Messages: 256
Registered: July 2009
Senior Member
I tried to reproduce. I tried to be quite close to the description you gave. But for me it works. The pull succeeds. Here is my script (containing also in which eclipse views I triggered what). What am I missing?

/tmp> uname -a
Linux vblub14 3.13.0-45-generic #74-Ubuntu SMP Tue Jan 13 19:36:28 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
/tmp> git --version
git version 2.2.2
/tmp> git init --bare lib.git
Reinitialized existing Git repository in /tmp/lib.git/
/tmp> git clone lib.git lib2
Cloning into 'lib2'...
warning: You appear to have cloned an empty repository.
done.
/tmp> cd lib2/
/tmp/lib2> echo a >lib.jar
/tmp/lib2> git add lib.jar 
/tmp/lib2> git commit -m "add lib.jar"
[master (root-commit) 22e3b1a] add lib.jar
 1 file changed, 1 insertion(+)
 create mode 100644 lib.jar
/tmp/lib2> git push origin master
Counting objects: 3, done.
Writing objects: 100% (3/3), 217 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To /tmp/lib.git
 * [new branch]      master -> master
/tmp/lib2> git tag VERSION_01
/tmp/lib2> git push origin --tags
Total 0 (delta 0), reused 0 (delta 0)
To /tmp/lib.git
 * [new tag]         VERSION_01 -> VERSION_01
/tmp/lib2> cd ..
/tmp> git init --bare a.git
Initialized empty Git repository in /tmp/a.git/
/tmp> # In Eclipse "Git Repositories" view cloned file://tmp/a.git to ~/git/a2. Selected "clone submodules" during clone.
/tmp> # ... got warnings that I cloned an empty repository
/tmp> 
/tmp> # Create a new Java project name "aproj" located at ~/git/a2
/tmp> # Project was automatically set to be version controlled by git repo ~/git/a2
/tmp> # The files .gitignore, .gitignore, .project got created
/tmp> # In Eclipse: staged the three files, commitet them and pushed upstream
/tmp> 
/tmp> # In Eclipse "Git Repositories" view right-clicked on the repo, selected "add Submodule", Submodule Path="lib", URI=file:////tmp/lib.git
/tmp> # In Eclipse: committed the submodule addition, pushed upstream
/tmp> 
/tmp> cd lib2/
/tmp/lib2> echo b >lib2.jar
/tmp/lib2> git add lib2.jar 
/tmp/lib2> git commit -m "add lib2.jar"
[master ddfb416] add lib2.jar
 1 file changed, 1 insertion(+)
 create mode 100644 lib2.jar
/tmp/lib2> git push origin master
Counting objects: 3, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 274 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To /tmp/lib.git
   22e3b1a..ddfb416  master -> master
/tmp/lib2> git tag VERSION_02
/tmp/lib2> git push origin --tags
Total 0 (delta 0), reused 0 (delta 0)
To /tmp/lib.git
 * [new tag]         VERSION_02 -> VERSION_02
/tmp/lib2> cd ..
/tmp> git clone a.git/ a3
Cloning into 'a3'...
done.
/tmp> cd a3
/tmp/a3> git pull origin master
From /tmp/a
 * branch            master     -> FETCH_HEAD
Already up-to-date.
/tmp/a3> git submodule init
Submodule 'lib' (file:////tmp/lib.git) registered for path 'lib'
/tmp/a3> git submodule update
Cloning into 'lib'...
remote: Counting objects: 6, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 6 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (6/6), done.
Checking connectivity... done.
Submodule path 'lib': checked out '22e3b1af9de89bc8e31285426ecb27983f2def8c'
/tmp/a3> cd lib
/tmp/a3/lib> git fetch --tags origin master
From file:////tmp/lib
 * branch            master     -> FETCH_HEAD
/tmp/a3/lib> git checkout VERSION_02
Previous HEAD position was 22e3b1a... add lib.jar
HEAD is now at ddfb416... add lib2.jar
/tmp/a3/lib> cd ..
/tmp/a3> git add .
/tmp/a3> git commit -m "updated a to version 02"
[master 2d0cb45] updated a to version 02
 1 file changed, 1 insertion(+), 1 deletion(-)
/tmp/a3> git push origin master 
Counting objects: 2, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 259 bytes | 0 bytes/s, done.
Total 2 (delta 1), reused 0 (delta 0)
To /tmp/a.git/
   a713eaa..2d0cb45  master -> master
/tmp> 
/tmp> # In Eclipse "Package Explorer" view on project "aproj": Select "Pull"
/tmp> # Result: a succesfull "fast forward merge". See attached screenshot
/tmp> 
/tmp/a3> cd ~/git/a2/
~/git/a2> git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

	modified:   lib (new commits)

no changes added to commit (use "git add" and/or "git commit -a")
~/git/a2> git log --oneline --decorate
2d0cb45 (HEAD, origin/master, master) updated a to version 02
a713eaa add submodule
9baf943 add project
~/git/a2>


  • Attachment: lub14.png
    (Size: 196.68KB, Downloaded 307 times)


Ciao
Chris
Re: Missing unknown when doing pull [message #1630452 is a reply to message #1623960] Mon, 23 February 2015 07:39 Go to previous messageGo to next message
Mattias Andersson is currently offline Mattias AnderssonFriend
Messages: 23
Registered: April 2013
Junior Member
Hi,

Thanks for trying to reproduce our problem. The only obvious difference I can see is that we are on Windows. I'll try to reproduce this on Linux. I have Ubuntu installed on virtualbox.

For us this problem happens (often) when someone has updated a sub module in a repository pushed this change to remote repository and others are pulling this change into a local repository.

Br,
/Mattias


Re: Missing unknown when doing pull [message #1634782 is a reply to message #1630452] Wed, 25 February 2015 12:56 Go to previous messageGo to next message
Mattias Andersson is currently offline Mattias AnderssonFriend
Messages: 23
Registered: April 2013
Junior Member
Hi,
haven't had the time to try to reproduce on Linux yet, but today another error occurred that looks related. When one of our developers did a cherry-pick from one branch to another and the commit happened to contains a sub module update as well as other changes he got the following errors:

org.eclipse.jgit.api.errors.JGitInternalException: Exception caught during execution of cherry-pick command. org.eclipse.jgit.errors.MissingObjectException: Missing unknown 678d4abddc14d96f5e40071cc85fd60425352686
at org.eclipse.jgit.api.CherryPickCommand.call(CherryPickCommand.java:192)
at org.eclipse.egit.core.op.CherryPickOperation$1.run(CherryPickOperation.java:76)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)
at org.eclipse.egit.core.op.CherryPickOperation.execute(CherryPickOperation.java:90)
at org.eclipse.egit.ui.internal.commit.command.CherryPickHandler$1.run(CherryPickHandler.java:97)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.eclipse.jgit.errors.MissingObjectException: Missing unknown 678d4abddc14d96f5e40071cc85fd60425352686
at org.eclipse.jgit.internal.storage.file.WindowCursor.open(WindowCursor.java:148)
at org.eclipse.jgit.lib.ObjectReader.open(ObjectReader.java:229)
at org.eclipse.jgit.dircache.DirCacheCheckout.checkoutEntry(DirCacheCheckout.java:1222)
at org.eclipse.jgit.merge.ResolveMerger.checkout(ResolveMerger.java:324)
at org.eclipse.jgit.merge.ResolveMerger.mergeTrees(ResolveMerger.java:1024)
at org.eclipse.jgit.merge.ResolveMerger.mergeImpl(ResolveMerger.java:301)
at org.eclipse.jgit.merge.Merger.merge(Merger.java:203)
at org.eclipse.jgit.merge.Merger.merge(Merger.java:156)
at org.eclipse.jgit.merge.ThreeWayMerger.merge(ThreeWayMerger.java:114)
at org.eclipse.jgit.api.CherryPickCommand.call(CherryPickCommand.java:158)
... 5 more

And when I open the commit in the commit viewer and double click on the sub module change it says that it can't find the blob for this change. Se attached picture. And as you can see it is in the sud module history??

I get the feeling that this is a windows only error? Can I turn on some more debugging in Eclipse to get some more information? Can I debug this?

Br,
/Mattias
Re: Missing unknown when doing pull [message #1634844 is a reply to message #1634782] Wed, 25 February 2015 13:39 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1032
Registered: July 2009
Senior Member
do you have a separate Eclipse project for the submodule ?
Re: Missing unknown when doing pull [message #1634935 is a reply to message #1634844] Wed, 25 February 2015 14:33 Go to previous messageGo to next message
Mattias Andersson is currently offline Mattias AnderssonFriend
Messages: 23
Registered: April 2013
Junior Member
Hi,

No. I didn't check the option to import the sub module (lib-core) when importing the project. The sub module contains libs so no one is ever editing anything in this sub module (it's the build process that pushes to this git repository).

We only do check-out on a specific tag when we want to upgrade the core libs and commit the sub-module change to the "main" repository.

I'll try to see if I can reproduce this cherry pick problem on linux (ubuntu).

Br,
/Mattias

Re: Missing unknown when doing pull [message #1634944 is a reply to message #1634935] Wed, 25 February 2015 14:35 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1032
Registered: July 2009
Senior Member
EGit currently doesn't really support Eclipse projects which are versioned in more than one git repository.
Re: Missing unknown when doing pull [message #1634994 is a reply to message #1634944] Wed, 25 February 2015 15:06 Go to previous messageGo to next message
Mattias Andersson is currently offline Mattias AnderssonFriend
Messages: 23
Registered: April 2013
Junior Member
Hi,

Okay, maybe I was not clear on how we are working with git.

This is what is looks like. We have several git repositories each of them reference one sub module (lib.git). The only thing we do in this repositories is to checkout the sub module on a specific tag.

a.git
sub module -> lib.git checked out on a specific tag (no edit of lib.git here. )

b.git
sub module -> lib.git checked out on a specific tag (no edit of lib.git here)

c.git
sub module -> lib.git checked out on a specific tag (no edit of lib.git here)

lib.git (here we add new versions that we tag and only here ).
No one has this git repository open in Eclipse (it only the build process that edits this repository)

We only use the submodule lib.git to be able to use different versions of our core libraries in different repositories. Also different branches in for instance a.git can refer to different lib.git tags. for example:

a.git (master branch)
sub module -> lib.git TAG VERSION_1

a.git (integration_467 branch)
sub module -> lib.git TAG VERSION_2

So in an ideal world eclipse would update sub-modules on branch switch.No we do this manually which means Eclipse builds twice Wink

In my mind this is quite simple usage, but perhaps I'm wrong Wink

So what you are saying is that this is not supported by Egit?










Re: Missing unknown when doing pull [message #1636549 is a reply to message #1634994] Thu, 26 February 2015 08:41 Go to previous messageGo to next message
Mattias Andersson is currently offline Mattias AnderssonFriend
Messages: 23
Registered: April 2013
Junior Member
Hi,

I just tried to reproduce the initial problem on Linux (Ubuntu) Eclipse Luna Service Release 1a (4.4.1) and Egit 33.6.2.201501210735-r and I can't reproduce it!!

So as I stated in a previous message I think this is a windows only error!?

Br,
/Mattias
Re: Missing unknown when doing pull [message #1645343 is a reply to message #1636549] Mon, 02 March 2015 13:10 Go to previous messageGo to next message
Christian Halstrick is currently offline Christian HalstrickFriend
Messages: 256
Registered: July 2009
Senior Member
I retried on windows: It works for me. What am I doing wrong? Here is the exact script I used:

[/tmp]$ uname -a
MINGW32_NT-6.2 WDFN00318987A 1.0.12(0.46/3/2) 2012-07-05 14:56 i686 unknown
[/tmp]$ git --version
git version 1.9.5.msysgit.0
[/tmp]$ git init --bare lib.git
Initialized empty Git repository in C:/Users/d032780/AppData/Local/Temp/lib.git/
[/tmp]$ git clone lib.git lib2
Cloning into 'lib2'...
warning: You appear to have cloned an empty repository.
done.
[/tmp]$ cd lib2
[/tmp/lib2 (master)]$ echo a >lib.jar
[/tmp/lib2 (master)]$ git add lib.jar
[/tmp/lib2 (master)]$ git commit -m "add lib.jar"
[master (root-commit) a23822a] add lib.jar
 1 file changed, 1 insertion(+)
 create mode 100644 lib.jar
[/tmp/lib2 (master)]$ git push origin master
Counting objects: 3, done.
Writing objects: 100% (3/3), 217 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To C:/Users/d032780/AppData/Local/Temp/lib.git
 * [new branch]      master -> master
[/tmp/lib2 (master)]$ git tag VERSION_01
[/tmp/lib2 (master)]$ git push origin --tags
Total 0 (delta 0), reused 0 (delta 0)
To C:/Users/d032780/AppData/Local/Temp/lib.git
 * [new tag]         VERSION_01 -> VERSION_01
[/tmp/lib2 (master)]$ cd ..
[/tmp]$ git init --bare a.git
Initialized empty Git repository in C:/Users/d032780/AppData/Local/Temp/a.git/
[/tmp]$ pwd
/tmp
[/tmp]$ # In Eclipse "Git Repositories" view cloned file://tmp/a.git to ~/git/a2. Selected "clone submodules" during clone.
[/tmp]$ # ... got warnings that I cloned an empty repository
[/tmp]$
[/tmp]$ # Create a new Java project name "aproj" located at ~/git/a2
[/tmp]$ # Project was automatically set to be version controlled by git repo ~/git/a2
[/tmp]$ # The files .gitignore, .gitignore, .project got created
[/tmp]$ # In Eclipse: staged the three files, commitet them and pushed upstream
[/tmp]$
[/tmp]$ # In Eclipse "Git Repositories" view right-clicked on the repo, selected "add Submodule", Submodule Path="lib", URI=file:////tmp/lib.git
[/tmp]$ # In Eclipse: committed the submodule addition, pushed upstream
[/tmp]$
[/tmp]$ cd lib2
[/tmp/lib2 (master)]$ echo b>lib2.jar
[/tmp/lib2 (master)]$ git add lib2.jar
[/tmp/lib2 (master)]$ git commit -m "add lib2.jar"
[master 650d15f] add lib2.jar
 1 file changed, 1 insertion(+)
 create mode 100644 lib2.jar
[/tmp/lib2 (master)]$ git push origin master
Counting objects: 4, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 273 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To C:/Users/d032780/AppData/Local/Temp/lib.git
   a23822a..650d15f  master -> master
[/tmp/lib2 (master)]$ git tag VERSION_02
[/tmp/lib2 (master)]$ git push origin --tags
Total 0 (delta 0), reused 0 (delta 0)
To C:/Users/d032780/AppData/Local/Temp/lib.git
 * [new tag]         VERSION_02 -> VERSION_02
[/tmp/lib2 (master)]$ cd ..
[/tmp]$ git clone a.git/ a3
Cloning into 'a3'...
done.
[/tmp]$ cd a3
[/tmp/a3 (master)]$ cd pull origin master
sh.exe": cd: pull: No such file or directory
[/tmp/a3 (master)]$ git pull origin master
From C:/Users/d032780/AppData/Local/Temp/a
 * branch            master     -> FETCH_HEAD
Already up-to-date.
[/tmp/a3 (master)]$ git submodule init
Submodule 'lib' (file:///C:\Users\d032780\AppData\Local\Temp\lib.git) registered for path 'lib'
[/tmp/a3 (master)]$ git submodule update
Cloning into 'lib'...
remote: Counting objects: 6, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 6 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (6/6), done.
Checking connectivity... done.
Submodule path 'lib': checked out 'a23822a24a64426a03fe512510e98eeb5a6720ab'
[/tmp/a3 (master)]$ cd lib
[/tmp/a3/lib ((VERSION_01))]$ git fetch --tags origin master
From file:///C:\Users\d032780\AppData\Local\Temp\lib
 * branch            master     -> FETCH_HEAD
[/tmp/a3/lib ((VERSION_01))]$ git checkout VERSION_02
Previous HEAD position was a23822a... add lib.jar
HEAD is now at 650d15f... add lib2.jar
[/tmp/a3/lib ((VERSION_02))]$ cd ..
[/tmp/a3 (master)]$ git add .
[/tmp/a3 (master)]$ git commit -m "updated a to version 02"
[master 0a33b1e] updated a to version 02
 1 file changed, 1 insertion(+), 1 deletion(-)
[/tmp/a3 (master)]$ git push origin master
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 257 bytes | 0 bytes/s, done.
Total 2 (delta 1), reused 0 (delta 0)
To C:/Users/d032780/AppData/Local/Temp/a.git/
   2c4f843..0a33b1e  master -> master
[/tmp/a3 (master)]$ cd ~/git/a2
[~/git/a2 (master)]$ git status
On branch master
Your branch is up-to-date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   lib (new commits)

no changes added to commit (use "git add" and/or "git commit -a")
[~/git/a2 (master)]$ git log --oneline --decorate
0a33b1e (HEAD, origin/master, master) updated a to version 02
2c4f843 add submodule
4aeedc2 create prj


Ciao
Chris
Re: Missing unknown when doing pull [message #1646056 is a reply to message #1645343] Mon, 02 March 2015 20:52 Go to previous messageGo to next message
Mattias Andersson is currently offline Mattias AnderssonFriend
Messages: 23
Registered: April 2013
Junior Member
Hi Christian ,

I tried with the exact same commands as you have and I still got the exception. So I just went through all git settings and found merge.ff=false in my git user settings.

Changing this to merge.ff=true and the error was gone Wink.

So setting merge.ff=false in Git User Setting triggers the missing unknown exception when pulling commits containing sub modules changes as far as I can tell.

After the exception do a Team ->Reset (--hard) and change the Git User Stetting to merge-ff=true and Team->pull will succeed.

I tried using "--no-ff" with native git (which I believe is the same) and it worked.

I used:
$ git config branch.master.mergeoptions "--no-ff"

and then when I did the pull in the a2 repository I got the following output.

man@SUPERMAN /f/git/a2 (master)
$ git pull origin master
remote: Counting objects: 3, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 2 (delta 1), reused 0 (delta 0)
Unpacking objects: 100% (2/2), done.
From file:///F:\git\a
* branch master -> FETCH_HEAD
8d209df..a0e006a master -> origin/master
Fetching submodule lib
remote: Counting objects: 7, done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 6 (delta 1), reused 0 (delta 0)
Unpacking objects: 100% (6/6), done.
From file:///F:\git\lib
db71fdc..007d5b3 master -> origin/master
* [new tag] VERSION_06 -> VERSION_06
* [new tag] VERSION_04 -> VERSION_04
Merge made by the 'recursive' strategy.
lib | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

The "--no-ff" option did change the output from git pull compare to when -"--no-ff" was not set. But the end result is the same for both cases...

I tell the developers here to set merge.ff to true and hopefully this will fix these issues for us.

But I guess JGit should be enhanced (in the future) to support -merge.ff =false together with sub modules as well since as far as I can tell it works with native git.

Br,
/Mattias








[Updated on: Mon, 02 March 2015 20:52]

Report message to a moderator

Re: Missing unknown when doing pull [message #1646172 is a reply to message #1646056] Mon, 02 March 2015 22:12 Go to previous messageGo to next message
Christian Halstrick is currently offline Christian HalstrickFriend
Messages: 256
Registered: July 2009
Senior Member
That's an interesting outcome. I'll investigate why jgit fails here.

merge.ff=false is indeed a non-standard setting. Are you sure that you want it? You say that the end result is the same. Maybe content-wise - but the versiongraph should look differently. With merge.ff=false every merge will result in a new commit. merge.ff=true doesn't create new commits when not needed.

Anyhow - if the config param is there and supported then JGit should behave like native git.


Ciao
Chris
Re: Missing unknown when doing pull [message #1646921 is a reply to message #1646172] Tue, 03 March 2015 06:59 Go to previous messageGo to next message
Mattias Andersson is currently offline Mattias AnderssonFriend
Messages: 23
Registered: April 2013
Junior Member
Hi Christian,

I do not think we need to use merge.ff=false. We were inspired by this:

http://nvie.com/posts/a-successful-git-branching-model/

But for us it's definitely no problem to remove this option in our default git settings. Especially since our git competence has increased over the last year.

Br,
/Mattias


Re: Missing unknown when doing pull [message #1723212 is a reply to message #1463304] Fri, 12 February 2016 13:56 Go to previous messageGo to next message
Piotr Tomiak is currently offline Piotr TomiakFriend
Messages: 7
Registered: May 2011
Junior Member
Hello!

I am getting a similar issue with EGit 4.2.0. The stack trace is as follows:

org.eclipse.jgit.api.errors.JGitInternalException: Exception caught during execution of merge command. org.eclipse.jgit.errors.MissingObjectException: Missing unknown ae355286bf70bf78444500f4e8d2df47af3dfb68
	at org.eclipse.jgit.api.MergeCommand.call(MergeCommand.java:421)
	at org.eclipse.egit.core.op.MergeOperation$1.run(MergeOperation.java:186)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2241)
	at org.eclipse.egit.core.op.MergeOperation.execute(MergeOperation.java:205)
	at org.eclipse.egit.ui.internal.history.command.MergeHandler$1.runInWorkspace(MergeHandler.java:102)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: org.eclipse.jgit.errors.MissingObjectException: Missing unknown ae355286bf70bf78444500f4e8d2df47af3dfb68
	at org.eclipse.jgit.internal.storage.file.WindowCursor.open(WindowCursor.java:145)
	at org.eclipse.jgit.lib.ObjectReader.open(ObjectReader.java:226)
	at org.eclipse.jgit.dircache.DirCacheCheckout.checkoutEntry(DirCacheCheckout.java:1239)
	at org.eclipse.jgit.dircache.DirCacheCheckout.checkoutEntry(DirCacheCheckout.java:1163)
	at org.eclipse.jgit.merge.ResolveMerger.checkout(ResolveMerger.java:327)
	at org.eclipse.jgit.merge.ResolveMerger.mergeTrees(ResolveMerger.java:1027)
	at org.eclipse.jgit.merge.ResolveMerger.mergeImpl(ResolveMerger.java:304)
	at org.eclipse.jgit.merge.Merger.merge(Merger.java:212)
	at org.eclipse.jgit.merge.Merger.merge(Merger.java:165)
	at org.eclipse.jgit.merge.ThreeWayMerger.merge(ThreeWayMerger.java:114)
	at org.eclipse.jgit.api.MergeCommand.call(MergeCommand.java:348)
	... 6 more


I am attaching a bash script file to reproduce the issue. If the last line is commented and the action is executed in Eclipse, you will get the above exception. Looking at the JGit code, merge code expects a file or directory object hash, but the hash is of a commit of submodule. Shall I file it as a bug on bugzilla?

For those who don't want to download sh file, here it is:
mkdir test
cd test
git init
git submodule add https://github.com/Genuitec/gerrit-tools gerrit-tools
cd gerrit-tools/
git checkout 391b7b29b3d1f33fff16abb7d8f74829b2a81eb3
cd ..
git commit -a -m "Initial commit"
git branch branch-to-merge
git checkout branch-to-merge
echo "foo" > bar
git add bar
git commit -a -m "Commit on a branch"
git checkout master
cd gerrit-tools/
git checkout ae355286bf70bf78444500f4e8d2df47af3dfb68
cd ..
git commit -a -m "Modified submodule commit"
git checkout branch-to-merge
git submodule update

#following works with command line but fails with jgit
git merge -m "merge" master
Re: Missing unknown when doing pull [message #1723366 is a reply to message #1723212] Mon, 15 February 2016 08:06 Go to previous messageGo to next message
Christian Halstrick is currently offline Christian HalstrickFriend
Messages: 256
Registered: July 2009
Senior Member
Do you also have the configuration merge.ff=false ? What is the output if you execute 'git config --get-regexp '.*merge.*'' in the root folder of your repo.

Ciao
Chris
Re: Missing unknown when doing pull [message #1723423 is a reply to message #1723366] Mon, 15 February 2016 14:43 Go to previous messageGo to next message
Piotr Tomiak is currently offline Piotr TomiakFriend
Messages: 7
Registered: May 2011
Junior Member
> Do you also have the configuration merge.ff=false ?

No. What I suspect is, this parameter was forcing to create a commit and without it, a normal fast-forward operation happened, which didn't get to problematic "merge" code.

> What is the output if you execute 'git config --get-regexp '.*merge.*'' in the root folder of your repo.

Nothing. I've checked my global config and there are just email/user settings.

Note that missing unknown ae355286bf70bf78444500f4e8d2df47af3dfb68 is hash of the commit object of submodule - you can see in the script that this commit is being checked out in submodule and that state is committed to master. The JGit code seems to treat submodule commit object as file object in the merge logic.

[Updated on: Mon, 15 February 2016 15:00]

Report message to a moderator

Re: Missing unknown when doing pull [message #1723704 is a reply to message #1723423] Wed, 17 February 2016 10:28 Go to previous messageGo to next message
Mattias Andersson is currently offline Mattias AnderssonFriend
Messages: 23
Registered: April 2013
Junior Member
Hi,

just for the record we no longer use merge.ff=false and we still get Missing unknown from time to time. We get the errors when we do pull and the missing commit hash is a commit in the submodule.

One of the commits that was pulled the last time I got the error is listed below, a change of sub module change. And I had not done Fetch from upstream on the sub-module before doing the pull so the commit _is_ not present in the sub-module (locally). I do not know if that is relevant but it feels like that merge command requires the commit to be present in the sub-module before merge? So perhaps jgit need to make a Fetch from upstream on all sub-module before pull, or just ignore these kind of commits and "add" the submodule to unstaged changes? I'm just guessing here of course since my knowledge of jgit internals are very limited...

Br,
/Mattias

Commit content:

index 605507a..c366d14 160000 (submodule)
--- a/tools
+++ b/tools
@@ -1 +1 @@
-Subproject commit 605507adb84099582c35f33dae338b2600860d4f
+Subproject commit c366d14500c96f7e9efd7e29eda0bc35ea353bfe

Stack trace from when this happened.

org.eclipse.jgit.api.errors.JGitInternalException: Exception caught during execution of merge command. org.eclipse.jgit.errors.MissingObjectException: Missing unknown c366d14500c96f7e9efd7e29eda0bc35ea353bfe
at org.eclipse.jgit.api.MergeCommand.call(MergeCommand.java:415)
at org.eclipse.jgit.api.PullCommand.call(PullCommand.java:329)
at org.eclipse.egit.core.op.PullOperation$1.run(PullOperation.java:106)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2241)
at org.eclipse.egit.core.op.PullOperation.execute(PullOperation.java:137)
at org.eclipse.egit.ui.internal.pull.PullOperationUI.execute(PullOperationUI.java:140)
at org.eclipse.egit.ui.internal.pull.PullOperationUI$1.runInWorkspace(PullOperationUI.java:115)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: org.eclipse.jgit.errors.MissingObjectException: Missing unknown c366d14500c96f7e9efd7e29eda0bc35ea353bfe
at org.eclipse.jgit.internal.storage.file.WindowCursor.open(WindowCursor.java:145)
at org.eclipse.jgit.lib.ObjectReader.open(ObjectReader.java:226)
at org.eclipse.jgit.dircache.DirCacheCheckout.checkoutEntry(DirCacheCheckout.java:1146)
at org.eclipse.jgit.merge.ResolveMerger.checkout(ResolveMerger.java:327)
at org.eclipse.jgit.merge.ResolveMerger.mergeTrees(ResolveMerger.java:1032)
at org.eclipse.jgit.merge.ResolveMerger.mergeImpl(ResolveMerger.java:304)
at org.eclipse.jgit.merge.Merger.merge(Merger.java:202)
at org.eclipse.jgit.merge.Merger.merge(Merger.java:155)
at org.eclipse.jgit.merge.ThreeWayMerger.merge(ThreeWayMerger.java:114)
at org.eclipse.jgit.api.MergeCommand.call(MergeCommand.java:342)
... 8 more


Re: Missing unknown when doing pull [message #1724938 is a reply to message #1723704] Sat, 27 February 2016 11:02 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1032
Registered: July 2009
Senior Member
I think we lack support for git pull --recurse-submodules [1]

[1] https://git-scm.com/docs/git-pull
Re: Missing unknown when doing pull [message #1725046 is a reply to message #1724938] Mon, 29 February 2016 10:37 Go to previous messageGo to next message
Mattias Andersson is currently offline Mattias AnderssonFriend
Messages: 23
Registered: April 2013
Junior Member
I've added a bug to JGit for this issue.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=488681

Br,
/Mattias
Re: Missing unknown when doing pull [message #1787595 is a reply to message #1463304] Tue, 29 May 2018 19:04 Go to previous message
Luis Muñoz is currently offline Luis MuñozFriend
Messages: 5
Registered: July 2009
Junior Member
Just for the record, I got a similar error when performing a commit.
It was due to a symbolic link I added to fix an external build reference. It was seen as a submodule by EGit thus throwing the error.
Another symptom was that branch information was not shown in package explorer view.
Removing the symlink fixed the issue.


Error occurred computing Git commit diffs

org.eclipse.jgit.errors.MissingObjectException: Missing unknown 22a7dde70daa480ba8b7e0953ad023cbf3c2dacf
	at org.eclipse.jgit.internal.storage.file.WindowCursor.open(WindowCursor.java:163)
	at org.eclipse.jgit.lib.ObjectReader.open(ObjectReader.java:234)
	at org.eclipse.jgit.treewalk.WorkingTreeIterator.readContentAsNormalizedString(WorkingTreeIterator.java:1056)
	at org.eclipse.jgit.treewalk.WorkingTreeIterator.contentCheck(WorkingTreeIterator.java:1014)
	at org.eclipse.jgit.treewalk.WorkingTreeIterator.isModified(WorkingTreeIterator.java:935)
	at org.eclipse.jgit.treewalk.filter.IndexDiffFilter.include(IndexDiffFilter.java:227)
	at org.eclipse.jgit.treewalk.filter.TreeFilter.matchFilter(TreeFilter.java:226)
	at org.eclipse.jgit.treewalk.filter.AndTreeFilter$List.matchFilter(AndTreeFilter.java:189)
	at org.eclipse.jgit.treewalk.TreeWalk.next(TreeWalk.java:829)
	at org.eclipse.jgit.lib.IndexDiff.diff(IndexDiff.java:440)
	at org.eclipse.egit.ui.internal.commit.CommitUI.getIndexDiff(CommitUI.java:327)
	at org.eclipse.egit.ui.internal.actions.CommitActionHandler$2.run(CommitActionHandler.java:150)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)
Previous Topic:How to create a new repo using jGit
Next Topic:Status of proposal and timeline?
Goto Forum:
  


Current Time: Tue Sep 25 09:17:55 GMT 2018

Powered by FUDForum. Page generated in 0.05795 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top