Externalize error message used in CheckoutCommand

Change-Id: Ifbc469b07e63218107157ffbf23ae55c52a55ef4
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
This commit is contained in:
Matthias Sohn 2015-04-03 00:29:41 +02:00
parent 7343c7a10f
commit bb2ca576ff
3 changed files with 3 additions and 2 deletions

View 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}

View File

@ -673,7 +673,6 @@ public CheckoutResult getResult() {
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);
}
}

View File

@ -103,6 +103,7 @@ public static JGitText get() {
/***/ public String cannotBeRecursiveWhenTreesAreIncluded;
/***/ public String cannotChangeActionOnComment;
/***/ public String cannotChangeToComment;
/***/ public String cannotCheckoutOursSwitchBranch;
/***/ public String cannotCombineSquashWithNoff;
/***/ public String cannotCombineTreeFilterWithRevFilter;
/***/ public String cannotCommitOnARepoWithState;