diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2015-04-03 00:29:41 +0200 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2015-04-08 22:52:06 +0200 |
commit | bb2ca576ff4012bfc40de8bc8c7ed24276a75519 (patch) | |
tree | a70a1b204359fb542f29dcd3a83d8f0bdc956341 /org.eclipse.jgit | |
parent | 7343c7a10f7cd180c77a985e793c27873918146d (diff) | |
download | jgit-bb2ca576ff4012bfc40de8bc8c7ed24276a75519.tar.gz jgit-bb2ca576ff4012bfc40de8bc8c7ed24276a75519.zip |
Externalize error message used in CheckoutCommand
Change-Id: Ifbc469b07e63218107157ffbf23ae55c52a55ef4
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit')
3 files changed, 3 insertions, 2 deletions
diff --git a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties index 2e20ada6e8..10f5339aea 100644 --- a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties +++ b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties @@ -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} diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CheckoutCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CheckoutCommand.java index 00c3e1f4bc..8d8aada622 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CheckoutCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CheckoutCommand.java @@ -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); } } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java index efd1613845..2448bf8964 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java @@ -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; |