Skip to content
This repository has been archived by the owner on Sep 12, 2021. It is now read-only.

get repo automatically from egit #62

Closed
bebehei opened this issue Jan 20, 2016 · 1 comment
Closed

get repo automatically from egit #62

bebehei opened this issue Jan 20, 2016 · 1 comment

Comments

@bebehei
Copy link

bebehei commented Jan 20, 2016

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
Copy link
Owner

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.

rherrmann added a commit that referenced this issue Jan 20, 2016
If an unrecognized command was entered while there was no repository
in use, an exception occured and its message was forwarded in response.

With this change the usual 'Unrecgnized command: ...' message is shown
as in other cases too.

See issue #62
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants