[BLUEJ-971] Git status throws an exception
Git throws an exception when doing a status command, but the status GUI just shows the same progress indicator. We should probably (a) make sure an error message gets shown in the GUI and (b) prevent the exception. Stack trace:
Exception in thread "Thread-13" java.lang.NullPointerException at bluej.groupwork.git.GitUtillities.findForkPoint(GitUtillities.java:138) at bluej.groupwork.git.GitStatusCommand.getResult(GitStatusCommand.java:170) at bluej.groupwork.ui.StatusFrame$StatusWorker.construct(StatusFrame.java:260) at bluej.utility.FXWorker$1.run(FXWorker.java:64) at java.lang.Thread.run(Thread.java:748)
Update: I think this is a knock-on effect of BLUEJ-968 where the repository did not finish initialising properly. If I do git pull on the command line, I get:
Your configuration specifies to merge with the ref 'refs/heads/master' from the remote, but no such ref was fetched.
A quick debug indicates that it's looking for origin/master but not finding it. (The point still stands about telling the user about the problem though, and not just silently throwing an NPE.)
Issue metadata
- Issue type: Bug
- Priority: Medium
- Fix versions: 4.1.0