A Help Command for Gonsole

Home  >>  Eclipse  >>  A Help Command for Gonsole

A Help Command for Gonsole

On January 25, 2016, Posted by , In Eclipse,Gonsole, By ,,, , With 8 Comments

We took the 4.2 release of JGit as an opportunity to not only include the new JGit version but also spend some time on Gonsole itself. The result are some bug fixes and smaller enhancements.

Most notably there is now a help command. When entered as-is, a list of known commands is printed

Some More Enhancements for Gonsole

When the name of a command is appended, like help commit for example, the usage information for that command is shown. Note that you can obtain the same information with the content assist. However, the help command is probably easier to discover in a console setting.

In addition some more usability issues haven been addressed:

  • Due to a change in JGit that went unrecognized, the help option (-h|--help) was broken. This option is now available again for all commands.
  • Entering an unknown command now leads to a clear error message in all situations
  • And if a Git command is entered that requires a repository but no repository is in use, a message is shown with a hint to change the repository.

With the change to JGit 4.2 you have access to some new and enhanced JGit commands, namely:

  • the git rev-parse command now has a --verify option
  • there is now a remote command to list and manage the tracked repositories
  • and the reset command supports -- <paths> parameters

For a complete list of changes, please See the JGit release notes. If you are curious to which version of JGit the commands you enter are delegated to, then type version and the current of JGit version will be printed out.

The new Gonsole version is labelled 1.3 and can be obtained from the Eclipse Marketplace or from the software repository:

See also  Lightweight Integration Tests for Eclipse Extensions

https://rherrmann.github.io/gonsole/repository/

Rüdiger Herrmann
Follow me
Latest posts by Rüdiger Herrmann (see all)

8 Comments so far:

  1. Valdemar says:

    Are you prepare the plan to support Eclipse Mars (4.5) and JGit 4.3?

    • Rüdiger Herrmann says:

      Gonsole is already compatible with future versions of JGit < 5.0. If you install Gonsole into an IDE that has JGit 4.3 installed, Gonsole will use the existing version. Use the version command to find out which version of JGit is being used.

      For example, if you start with the Mars Eclipse IDE for Java Developers which contains a Git client that uses JGit and then install Gonsole, you’ll be able to use JGit 4.3.

      Currently JGit 4.2 is used by default but we will upgrade to the latest version of JGit as soon as we find some time. Unfortunately, this task isn’t as easy as it used to be, because the JGit maintainers decided to vastly extend the list of (transient) dependencies required by the command line interpreter. Feel free to open an issue to track progress.

  2. Rlaks says:

    what is the GONSOLE command equivalent of ‘git pull’. I see push but not pull

    • Rüdiger Herrmann says:

      Gonsole uses the JGit CLI to execute the entered commands and JGit does not currently implement git pull.

      However, pull is simply a shorthand for git fetch, followed by git rebase or git merge and at least fetch and merge are available in JGit.

  3. Rlaks says:

    thanks for the reply Mr Herrmann. I have another question related to authentication.

    i get

    fetch origin
    java.lang.RuntimeException: org.eclipse.jgit.api.errors.TransportException: https://…….Authentication is required but no CredentialsProvider has been registered
    at com.codeaffine.console.core.util.Throwables.propagate(Throwables.java:23)

    where do we provide the credentials?

    • Rüdiger Herrmann says:

      Unfortunately, JGit CLI uses a global credentials provider and authenticator callback. In order to avoid potential conflicts with Egit or other plug-ins that set these global callbacks, Gonsole does not tamper with global JGit state.

      Unless JGit CLI allows to set these callbacks per environment, there isn’t much that Gonsole can do about this. To work around the issue, you could install Egit, which registers its own callback that would also allow to authenticate requests that were initialted by Gonsole.

  4. PahiDD says:

    Hello, I started using one of your products and I have questions.
    I have Windows 10 installed.
    I have installed the Eclipse IDE for Java Developers-Version: 2020-06 (4.16.0)
    I have installed JRE jdk8u242-b08
    I haven’t installed Git, but the product website says that there is no need to install Git

    I started using the Gonsole product and the following functions do not work for me:
    The key combination Ctrl + Space opens a content assist popup that shows all availble commands.
    To see a history of recently typed commands, use the Arrow Up key.

    I press the key combination Ctrl + Space to open the tooltips, but I only see the message “There are no matches”.

    • Rüdiger Herrmann says:

      For me, It’s working, though, I’m not using Windows 10, and I don’t have access to one to try. Did you see anything related in the error log (Window > Show View > Error Log)?