diff options
author | Andre Bossert <andre.bossert@siemens.com> | 2020-01-19 20:41:23 +0100 |
---|---|---|
committer | Simeon Andreev <simeon.danailov.andreev@gmail.com> | 2021-12-08 10:43:00 +0100 |
commit | 14a59bdc7b37c85591eed07bc60c3f4fdcde2a8a (patch) | |
tree | fea19991aa9b034079a8e0acf437aadb750fb076 /org.eclipse.jgit.pgm/src | |
parent | caea5a26f08c6cf969607a178bc54896120d0940 (diff) | |
download | jgit-14a59bdc7b37c85591eed07bc60c3f4fdcde2a8a.tar.gz jgit-14a59bdc7b37c85591eed07bc60c3f4fdcde2a8a.zip |
Add config reader for user-defined difftools
see: http://git-scm.com/docs/git-difftool
* add config reader for user-defined difftools
* diff.tool
* diff.guitool
* difftool.prompt
* difftool.trustExitCode
* difftool.<tool>.path
* difftool.<tool>.cmd
* add pre-defined difftools
* implemented "git difftool --tool-help" to verify config reader and
pre-defined difftools
Bug: 356832
Change-Id: Idde8fddbef61f3378ee565c6321570b3962d0e1d
Signed-off-by: Andre Bossert <andre.bossert@siemens.com>
Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.pgm/src')
-rw-r--r-- | org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTool.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTool.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTool.java index 9fc26c9356..d26842c641 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTool.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTool.java @@ -199,20 +199,20 @@ class DiffTool extends TextBuiltin { } private void showToolHelp() throws IOException { - String availableToolNames = new String(); + StringBuilder availableToolNames = new StringBuilder(); for (String name : diffTools.getAvailableTools().keySet()) { - availableToolNames += String.format("\t\t{0}\n", name); //$NON-NLS-1$ + availableToolNames.append(String.format("\t\t%s\n", name)); //$NON-NLS-1$ } - String notAvailableToolNames = new String(); + StringBuilder notAvailableToolNames = new StringBuilder(); for (String name : diffTools.getNotAvailableTools().keySet()) { - notAvailableToolNames += String.format("\t\t{0}\n", name); //$NON-NLS-1$ + notAvailableToolNames.append(String.format("\t\t%s\n", name)); //$NON-NLS-1$ } - String userToolNames = new String(); + StringBuilder userToolNames = new StringBuilder(); Map<String, ExternalDiffTool> userTools = diffTools .getUserDefinedTools(); for (String name : userTools.keySet()) { - availableToolNames += String.format("\t\t{0}.cmd {1}\n", //$NON-NLS-1$ - name, userTools.get(name).getCommand()); + userToolNames.append(String.format("\t\t%s.cmd %s\n", //$NON-NLS-1$ + name, userTools.get(name).getCommand())); } outw.println(MessageFormat.format( CLIText.get().diffToolHelpSetToFollowing, availableToolNames, |