Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "JGit/New and Noteworthy/6.2"
(→Support for External Diff and Merge Tools) |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 9: | Line 9: | ||
=== Negative Refspecs === | === Negative Refspecs === | ||
− | JGit 6.2 supports ''negative refspecs'' when fetching, introduced in C git 2.29. Negative refspecs enable a git client to specify that some refs should ''not'' be fetched. A negative refspec has the form <tt>^refs/...</tt> and it many | + | JGit 6.2 supports ''negative refspecs'' when fetching, introduced in C git 2.29. Negative refspecs enable a git client to specify that some refs should ''not'' be fetched. A negative refspec has the form <tt>^refs/...</tt> and it many contain the <tt>*</tt> wildcard. For the details, see the [https://git-scm.com/docs/git-fetch#Documentation/git-fetch.txt-ltrefspecgt git fetch documentation], or the [https://github.blog/2020-10-19-git-2-29-released/#user-content-negative-refspecs git 2.29 announcement]. |
=== Support for External Diff and Merge Tools === | === Support for External Diff and Merge Tools === | ||
− | JGit 6.2 supports the use of external diff and merge tools. To invoke a merge | + | JGit 6.2 supports the use of external diff and merge tools. To invoke a merge or diff tool use, for instance: |
− | + | jgit difftool --tool=kdiff3 | |
− | jgit | + | jgit mergetool --tool=kdiff3 |
− | jgit | + | |
− | + | ||
− | + | The list of diff or merge tools configured on the system may be obtained via | |
− | + | jgit difftool --tool-help | |
+ | jgit mergetool --tool-help | ||
− | + | Diff or merge tools are defined in the git configuration files, typically in the repository or user git config. The mechanism is the same for both. An example of a merge tool definition might be | |
− | + | ||
− | + | ||
− | + | ||
− | + | [merge] | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | [merge] | + | |
tool = customTool | tool = customTool | ||
− | [mergetool "customTool"] | + | [mergetool "customTool"] |
cmd = echo | cmd = echo | ||
path = /usr/bin/echo | path = /usr/bin/echo | ||
prompt = false | prompt = false | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
trustExitCode = false | trustExitCode = false | ||
− | |||
− | + | For a diff tool definition, use <tt>diff.tool = <name></tt> and define it via <tt>diff.<name>.*</tt> instead of <tt>merge.tool</tt> and <tt>merge.<name>.*</tt>. | |
− | + | For the details of configurations and possible parameters to the <tt>difftool</tt> or <tt>mergetool</tt> commands, see the official git documentation on <tt>[https://git-scm.com/docs/git-difftool git difftool]</tt> and <tt>[https://git-scm.com/docs/git-mergetool git mergetool]</tt>. | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | difftool | + | |
− | + | ||
− | + | ||
− | + | ||
− | </ | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
== Other Changes == | == Other Changes == | ||
− | The complete list of new features and bug fixes is available in the [https://projects.eclipse.org/projects/technology.jgit/releases/6.2/ release notes]. | + | The complete list of new features and bug fixes is available in the [https://projects.eclipse.org/projects/technology.jgit/releases/6.2.0/ release notes]. |
= Contributors = | = Contributors = | ||
− | The following | + | The following 13 developers worked on this release: |
+ | |||
+ | Andre Bossert, | ||
+ | Andrey Loskutov, | ||
+ | Fabio Ponciroli, | ||
+ | Han-Wen Nienhuys, | ||
+ | James Z.M. Gao, | ||
+ | Luca Milanesio, | ||
+ | Matthias Fromme, | ||
+ | Matthias Sohn, | ||
+ | Michael Keppler, | ||
+ | Simon Sohrt, | ||
+ | Sven Selberg, | ||
+ | Thomas Wolf, | ||
+ | Yun Jieli | ||
− | + | [[Category:JGit]] |
Latest revision as of 22:42, 29 November 2023
Contents
JGit
New Features
Git config core.commentChar
The git config core.commentChar is supported as of JGit 6.2. It enables users to change the default character indicating comment lines in commit messages, which by default is #. The auto setting is also supported.
Negative Refspecs
JGit 6.2 supports negative refspecs when fetching, introduced in C git 2.29. Negative refspecs enable a git client to specify that some refs should not be fetched. A negative refspec has the form ^refs/... and it many contain the * wildcard. For the details, see the git fetch documentation, or the git 2.29 announcement.
Support for External Diff and Merge Tools
JGit 6.2 supports the use of external diff and merge tools. To invoke a merge or diff tool use, for instance:
jgit difftool --tool=kdiff3 jgit mergetool --tool=kdiff3
The list of diff or merge tools configured on the system may be obtained via
jgit difftool --tool-help jgit mergetool --tool-help
Diff or merge tools are defined in the git configuration files, typically in the repository or user git config. The mechanism is the same for both. An example of a merge tool definition might be
[merge] tool = customTool [mergetool "customTool"] cmd = echo path = /usr/bin/echo prompt = false trustExitCode = false
For a diff tool definition, use diff.tool = <name> and define it via diff.<name>.* instead of merge.tool and merge.<name>.*.
For the details of configurations and possible parameters to the difftool or mergetool commands, see the official git documentation on git difftool and git mergetool.
Other Changes
The complete list of new features and bug fixes is available in the release notes.
Contributors
The following 13 developers worked on this release:
Andre Bossert, Andrey Loskutov, Fabio Ponciroli, Han-Wen Nienhuys, James Z.M. Gao, Luca Milanesio, Matthias Fromme, Matthias Sohn, Michael Keppler, Simon Sohrt, Sven Selberg, Thomas Wolf, Yun Jieli