Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "EGit/New and Noteworthy/6.1"

(Screenshot for syntax-colored commit message comment lines, and for the commit message preview)
(Commit Messages)
Line 21: Line 21:
 
[[File:EGit 6.1 Commit Message Preview.png|alt="The commit message preview shows the final commit message, with comment lines removed."]]
 
[[File:EGit 6.1 Commit Message Preview.png|alt="The commit message preview shows the final commit message, with comment lines removed."]]
  
This preview shows the final verbatim commit message that will be used.
+
This preview shows the final verbatim commit message that will be used. (A Gerrit Change-Id of all zeroes will still be replaced upon commit.)
  
 
== SSH Agent Support ==
 
== SSH Agent Support ==

Revision as of 13:38, 6 February 2022

EGit

Fetching Pull Requests

Fetching pull requests has been enabled also for Gitea servers. By default, the command Fetch Gitea Pull Request... is enabled if the host of a remote URI is "gitea.com". For self-hosted installations running at other host names, define custom host name patterns at Preferences→Version Control (Team)→Git→Servers.

Commit Messages

EGit 6.1 has full support for git config commit.cleanup. This changes the behavior in the UI from previous EGit versions. Previously, EGit used the text the user entered as-is as commit message (except when squashing commits, where it did already remove comment lines). EGit 6.1 now always cleans up commit messages as specified by the git config commit.cleanup. The default setting is "strip", which means to remove comment lines, trailing whitespace, leading and trailing empty lines, and to collapse multiple consecutive empty lines to a single one.

A comment line in a commit message is a line that has a # as the first non-whitespace character. Beware of this if you have the habit to start commit message lines with a hash (for instance, to use an issue reference of Github or similar git servers): A commit line like "#123 Fix the furtible gobble" is a comment line and will be removed! To avoid this, let the line start with some other character, for instance, write "Issue #123: ..." or "[#123] ...", or place the issue number at the end. (Or on Github, don't put the issue number in the commit title at all and have a body line like "Fixes #123", which on Github will close the issue when the commit is merged.)

EGit 6.1 comes with two UI features to help users with this behavioral change. First, wherever the user can edit a commit message, comment lines are colored differently.

"Colored comment lines in a commit message in EGit 6.1"

The green lines are comments, and will be removed before making the commit. The color is configurable in the color preferences of Eclipse at Preferences→General→Appearance→Colors and Fonts in the "Git" section.

Second, the Git Staging view has a new "preview" button for the commit message. When activated, it shows a read-only view of the final commit message.

"The commit message preview shows the final commit message, with comment lines removed."

This preview shows the final verbatim commit message that will be used. (A Gerrit Change-Id of all zeroes will still be replaced upon commit.)

SSH Agent Support

On Windows, JGit 6.1 supports not only Pageant or gpg-agent running in Pageant mode, but newly also Win32-OpenSSH, the OpenSSH port from Microsoft that is included in modern Windows.

EGit 6.1 on Windows has an enhanced SSH agent preference where the user can define which SSH agent, if running, should be used by default if nothing is specified via the IdentityAgent setting in the SSH configuration file ~/.ssh/config.

"Screenshot of the EGit preferences with the default SSH agent selector available on Windows highlighted"

Note that the choice between "Pageant" and "Win32-OpenSSH" applies only if the SSH configuration file doesn't specify anything else; it can be overridden by the IdentityAgent configuration setting. The setting for "Use SSH agent for SSH connections", on the other hand, is a global master switch, and switches off SSH agent use no matter what the SSH configuration file says. SSH configurations related to SSH agents are considered only if this setting is switched on.

On Linux or OS X, the choice preference is not shown since there is only one communication mechanism with SSH agents (via a Unix domain socket, normally provided via environment variable SSH_AUTH_SOCK). Using this environment variable is the single default.

See also the JGit description of SSH agent support for additional details.

Other Changes

The complete list of new features and bug fixes is available in the release notes.

Contributors

The following X developers worked on this release:

<TBD: list of contributors, number>

See Also

See also the new features in JGit for additional information.

Back to the top