rherrmann / gonsole

Gonsole - Git Console for the Eclipse IDE
http://gonsole.codeaffine.com
38 stars 10 forks source link

get repo automatically from egit #62

Closed bebehei closed 8 years ago

bebehei commented 8 years ago

This was my beginning with gonsole:

no repository> help
java.lang.IllegalArgumentException: One of setGitDir or setWorkTree must be called.
    at org.eclipse.jgit.lib.BaseRepositoryBuilder.requireGitDirOrWorkTree(BaseRepositoryBuilder.java:588)
[...]
no repository> setWorkTree("/home/bebe/code/workspace/libvirt-slave-plugin")
java.lang.IllegalArgumentException: One of setGitDir or setWorkTree must be called.
    at org.eclipse.jgit.lib.BaseRepositoryBuilder.requireGitDirOrWorkTree(BaseRepositoryBuilder.java:588)

Of course, there is use. There is also in big fat font the configuration described on the website to configure the repos at Team > Git Console > Repository Locations. Wouldn't it be the more eclipse way to automatically use the git repositories from the git repositories-view?

Additionally it would be great, if the IllegalArgumentException would be catched and processed to give a hint about use.

rherrmann commented 8 years ago

Thank you for your feedback.

The response to the unknown command help is a bug that has gone unnoticed so far. It surfaces when an unknown command is entered while no repository is in use. You should have received the message Unrecognized command: help. I will fix this and report here.

If you have installed the optional EGit integration, that is available from the same software site as Gonsole itself, you can type

use <name of repository as shown in EGit repository view>

to switch to a repositroy known by EGit.

I agree that it would be helpful to give a hint about use when there is no repository in use. But then the hint should only be shown if no repository is in use. Otherwise it would disturb more than help (the user has apparently already figured out how to switch repositories). And that in turn requires some work that I won't have time for in the near future. I've filed issue #63 to track this enhancement. If you would like to contribute this enhancement I will of course be able to give support.