]> source.dussan.org Git - jgit.git/commitdiff
pgm: Fix too wide lines in Commit.run() 87/135387/1
authorMatthias Sohn <matthias.sohn@sap.com>
Sun, 20 Jan 2019 00:38:36 +0000 (01:38 +0100)
committerMatthias Sohn <matthias.sohn@sap.com>
Sun, 20 Jan 2019 00:40:05 +0000 (01:40 +0100)
Change-Id: I695d1771b808217b0fbde29805e53a819d8c3303
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Commit.java
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/internal/CLIText.java

index 538c87661b0969c1e2c5769bda49b879dec955ec..69bf1723ef948d0d16c87f2cf02acb82f3744597 100644 (file)
@@ -175,7 +175,7 @@ notOnAnyBranch=Not currently on any branch.
 onBranch=On branch {0}
 onBranchToBeBorn=You are on a branch yet to be born
 onlyOneMetaVarExpectedIn=Only one {0} expected in {1}.
-onlyOneOfIncludeOnlyAllInteractiveCanBeUsed=Only one of --include/--only/--all/--interactive can be used.
+onlyOneCommitOptionAllowed=Only one of --include/--only/--all/--interactive can be used.
 password=Password:
 pathspecDidNotMatch=error: pathspec ''{0}'' did not match any file(s) known to git.
 pushTo=To {0}
index d1ab529deb50394c2c6abc2dcfff9c1b47092188..b0713f782cbbff25719bccc28cff1fa74e0f2a9c 100644 (file)
@@ -107,7 +107,7 @@ class Commit extends TextBuiltin {
                                throw die(CLIText.get().pathsRequired);
                        }
                        if (only && all) {
-                               throw die(CLIText.get().onlyOneOfIncludeOnlyAllInteractiveCanBeUsed);
+                               throw die(CLIText.get().onlyOneCommitOptionAllowed);
                        }
                        if (!paths.isEmpty()) {
                                for (String p : paths) {
@@ -133,10 +133,11 @@ class Commit extends TextBuiltin {
                        } else {
                                branchName = head.getTarget().getName();
                                if (branchName.startsWith(Constants.R_HEADS)) {
-                                       branchName = branchName.substring(Constants.R_HEADS.length());
+                                       branchName = branchName
+                                                       .substring(Constants.R_HEADS.length());
                                }
                        }
-                       outw.println("[" + branchName + " " + commit.name() + "] " //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+                       outw.println('[' + branchName + ' ' + commit.name() + "] " //$NON-NLS-1$
                                        + commit.getShortMessage());
                } catch (IOException e) {
                        throw die(e.getMessage(), e);
index b3ad8bf403fb46a7ae777caa2e1daa24db674dbc..397b6b14ba7bf998023645d0c7da8fa3d00a6683 100644 (file)
@@ -278,7 +278,7 @@ public class CLIText extends TranslationBundle {
        /***/ public String onBranchToBeBorn;
        /***/ public String onBranch;
        /***/ public String onlyOneMetaVarExpectedIn;
-       /***/ public String onlyOneOfIncludeOnlyAllInteractiveCanBeUsed;
+       /***/ public String onlyOneCommitOptionAllowed;
        /***/ public String password;
        /***/ public String pathspecDidNotMatch;
        /***/ public String pushTo;