]> source.dussan.org Git - jgit.git/commitdiff
Externalize error message used in CheckoutCommand 83/45183/3
authorMatthias Sohn <matthias.sohn@sap.com>
Thu, 2 Apr 2015 22:29:41 +0000 (00:29 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Wed, 8 Apr 2015 20:52:06 +0000 (22:52 +0200)
Change-Id: Ifbc469b07e63218107157ffbf23ae55c52a55ef4
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
org.eclipse.jgit/src/org/eclipse/jgit/api/CheckoutCommand.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java

index 2e20ada6e8275d45485c7a00201ea6a1f29de298..10f5339aea117eb682dc453ca1efa58d970676a3 100644 (file)
@@ -44,6 +44,7 @@ cannotBeCombined=Cannot be combined.
 cannotBeRecursiveWhenTreesAreIncluded=TreeWalk shouldn't be recursive when tree objects are included.
 cannotChangeActionOnComment=Cannot change action on comment line in git-rebase-todo file, old action: {0}, new action: {1}.
 cannotChangeToComment=Cannot change a non-comment line to a comment line.
+cannotCheckoutOursSwitchBranch=Checking out ours/theirs is only possible when checking out index, not when switching branches.
 cannotCombineSquashWithNoff=Cannot combine --squash with --no-ff.
 cannotCombineTreeFilterWithRevFilter=Cannot combine TreeFilter {0} with RevFilter {1}.
 cannotCommitOnARepoWithState=Cannot commit on a repo with state: {0}
index 00c3e1f4bce836d8005a5631e6a38fb9f8472466..8d8aada6228496e6006ee7624daf93a224943fdc 100644 (file)
@@ -673,7 +673,6 @@ public class CheckoutCommand extends GitCommand<Ref> {
        private void checkOptions() {
                if (checkoutStage != null && !isCheckoutIndex())
                        throw new IllegalStateException(
-                                       "Checking out ours/theirs is only possible when checking out index, "
-                                                       + "not when switching branches.");
+                                       JGitText.get().cannotCheckoutOursSwitchBranch);
        }
 }
index efd1613845c441f11d639d7cca1caf91f57d5585..2448bf8964f67ba11ce9e00f539d3c6115db4c5c 100644 (file)
@@ -103,6 +103,7 @@ public class JGitText extends TranslationBundle {
        /***/ public String cannotBeRecursiveWhenTreesAreIncluded;
        /***/ public String cannotChangeActionOnComment;
        /***/ public String cannotChangeToComment;
+       /***/ public String cannotCheckoutOursSwitchBranch;
        /***/ public String cannotCombineSquashWithNoff;
        /***/ public String cannotCombineTreeFilterWithRevFilter;
        /***/ public String cannotCommitOnARepoWithState;