Browse Source

Externalize error message used in CheckoutCommand

Change-Id: Ifbc469b07e63218107157ffbf23ae55c52a55ef4
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
stable-4.1
Matthias Sohn 10 years ago
parent
commit
bb2ca576ff
  1. 1
      org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
  2. 3
      org.eclipse.jgit/src/org/eclipse/jgit/api/CheckoutCommand.java
  3. 1
      org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java

1
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. 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}. 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. 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. cannotCombineSquashWithNoff=Cannot combine --squash with --no-ff.
cannotCombineTreeFilterWithRevFilter=Cannot combine TreeFilter {0} with RevFilter {1}. cannotCombineTreeFilterWithRevFilter=Cannot combine TreeFilter {0} with RevFilter {1}.
cannotCommitOnARepoWithState=Cannot commit on a repo with state: {0} cannotCommitOnARepoWithState=Cannot commit on a repo with state: {0}

3
org.eclipse.jgit/src/org/eclipse/jgit/api/CheckoutCommand.java

@ -673,7 +673,6 @@ public class CheckoutCommand extends GitCommand<Ref> {
private void checkOptions() { private void checkOptions() {
if (checkoutStage != null && !isCheckoutIndex()) if (checkoutStage != null && !isCheckoutIndex())
throw new IllegalStateException( throw new IllegalStateException(
"Checking out ours/theirs is only possible when checking out index, " JGitText.get().cannotCheckoutOursSwitchBranch);
+ "not when switching branches.");
} }
} }

1
org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java

@ -103,6 +103,7 @@ public class JGitText extends TranslationBundle {
/***/ public String cannotBeRecursiveWhenTreesAreIncluded; /***/ public String cannotBeRecursiveWhenTreesAreIncluded;
/***/ public String cannotChangeActionOnComment; /***/ public String cannotChangeActionOnComment;
/***/ public String cannotChangeToComment; /***/ public String cannotChangeToComment;
/***/ public String cannotCheckoutOursSwitchBranch;
/***/ public String cannotCombineSquashWithNoff; /***/ public String cannotCombineSquashWithNoff;
/***/ public String cannotCombineTreeFilterWithRevFilter; /***/ public String cannotCombineTreeFilterWithRevFilter;
/***/ public String cannotCommitOnARepoWithState; /***/ public String cannotCommitOnARepoWithState;

Loading…
Cancel
Save