JGIT version: 4.4.1.
-----------------------------------------
Description:
"blame -w" fails whereas simple "blame" works fine for the very same file.
If I use Git version 1.7.9.5 on Ubuntu 12.04 it blames the same file with "-w" option, which makes me think that it is JGIT issue.
-----------------------------------------
-----------------------------------------
I use SonarQube in conjunction with Jenkins, below are error messages from Jenkins:
ERROR: Error during SonarQube Scanner execution
java.lang.IllegalStateException: Unable to blame file <filename>.cpp
at org.sonarsource.scm.git.JGitBlameCommand.blame(JGitBlameCommand.java:128)
at org.sonarsource.scm.git.JGitBlameCommand.access$000(JGitBlameCommand.java:44)
at org.sonarsource.scm.git.JGitBlameCommand$1.call(JGitBlameCommand.java:112)
at org.sonarsource.scm.git.JGitBlameCommand$1.call(JGitBlameCommand.java:109)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
at org.eclipse.jgit.blame.BlameGenerator.getSourceStart(BlameGenerator.java:870)
at org.eclipse.jgit.blame.BlameResult.loadFrom(BlameResult.java:338)
at org.eclipse.jgit.blame.BlameResult.computeAll(BlameResult.java:240)
at org.eclipse.jgit.blame.BlameGenerator.computeBlameResult(BlameGenerator.java:450)
at org.eclipse.jgit.api.BlameCommand.call(BlameCommand.java:230)
at org.sonarsource.scm.git.JGitBlameCommand.blame(JGitBlameCommand.java:126)
... 7 more
-----------------------------------------
Let me know, what else diagnostic/investigatory can be done to allocate the cause of the problem, for now I have just excluded this file from SonarQube analysis.