Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Missing blob when doing a git diff with jgit
Missing blob when doing a git diff with jgit [message #1764492] Tue, 30 May 2017 13:34
Thibault beziers la fosse is currently offline Thibault beziers la fosseFriend
Messages: 10
Registered: February 2017
Junior Member
Hello, I'm trying to list all the line modified in a git repository using jgit.

I created a simple maven project "Test", ran:

git init
git add src/*
git commit -am "first commit"

And then finally did a simple code modification to have an output when running
git diff

From an other Java project, I run the following code, in order to list the lines modified in the "Test" project.

repository = new FileRepositoryBuilder().setGitDir(/* Test project .git file */).build();
Git git = new Git(repository);
List<DiffEntry> entries = git.diff().call();
DiffFormatter diffFormatter = new DiffFormatter(System.out);

Nonetheless I only obtain the following error:
org.eclipse.jgit.errors.MissingObjectException: Missing blob 07c5f824f6b780ee405823f793248846a0e9e11e
	at org.eclipse.jgit.diff.ContentSource$
	at org.eclipse.jgit.diff.ContentSource$
	at org.eclipse.jgit.diff.DiffFormatter.createFormatResult(
	at org.eclipse.jgit.diff.DiffFormatter.toFileHeader(

My git deposit is quite simple, thus I don't understand what is wrong in my code. Tell me if you need more informations.

Best regards,


[Updated on: Tue, 30 May 2017 13:41]

Report message to a moderator

Previous Topic:Flaky web access to git repository
Next Topic:egit Broken after upgrade
Goto Forum:

Current Time: Tue Mar 20 12:04:22 GMT 2018

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

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