FAST_FORWARD {
@Override
public String toString() {
- return "Fast-forward";
+ return "Fast-forward"; //$NON-NLS-1$
}
@Override
FAST_FORWARD_SQUASHED {
@Override
public String toString() {
- return "Fast-forward-squashed";
+ return "Fast-forward-squashed"; //$NON-NLS-1$
}
@Override
ALREADY_UP_TO_DATE {
@Override
public String toString() {
- return "Already-up-to-date";
+ return "Already-up-to-date"; //$NON-NLS-1$
}
@Override
FAILED {
@Override
public String toString() {
- return "Failed";
+ return "Failed"; //$NON-NLS-1$
}
@Override
MERGED {
@Override
public String toString() {
- return "Merged";
+ return "Merged"; //$NON-NLS-1$
}
@Override
MERGED_SQUASHED {
@Override
public String toString() {
- return "Merged-squashed";
+ return "Merged-squashed"; //$NON-NLS-1$
}
@Override
MERGED_SQUASHED_NOT_COMMITTED {
@Override
public String toString() {
- return "Merged-squashed-not-committed";
+ return "Merged-squashed-not-committed"; //$NON-NLS-1$
}
@Override
CONFLICTING {
@Override
public String toString() {
- return "Conflicting";
+ return "Conflicting"; //$NON-NLS-1$
}
@Override
ABORTED {
@Override
public String toString() {
- return "Aborted";
+ return "Aborted"; //$NON-NLS-1$
}
@Override
**/
MERGED_NOT_COMMITTED {
public String toString() {
- return "Merged-not-committed";
+ return "Merged-not-committed"; //$NON-NLS-1$
}
@Override
NOT_SUPPORTED {
@Override
public String toString() {
- return "Not-yet-supported";
+ return "Not-yet-supported"; //$NON-NLS-1$
}
@Override
*/
CHECKOUT_CONFLICT {
public String toString() {
- return "Checkout Conflict";
+ return "Checkout Conflict"; //$NON-NLS-1$
}
@Override
}
map.set(id, null, inserter);
commitNoteMap(walk, map, notesCommit, inserter,
- "Notes removed by 'git notes remove'");
+ "Notes removed by 'git notes remove'"); //$NON-NLS-1$
return map.getNote(id);
} catch (IOException e) {
throw new JGitInternalException(e.getMessage(), e);
if (!filepaths.isEmpty())
throw new JGitInternalException(MessageFormat.format(
JGitText.get().illegalCombinationOfArguments,
- "[--mixed | --soft | --hard]", "<paths>...")); //$NON-NLS-1$
+ "[--mixed | --soft | --hard]", "<paths>...")); //$NON-NLS-1$ //$NON-NLS-2$
this.mode = mode;
return this;
}
public ResetCommand addPath(String path) {
if (mode != null)
throw new JGitInternalException(MessageFormat.format(
- JGitText.get().illegalCombinationOfArguments, "<paths>...",
+ JGitText.get().illegalCombinationOfArguments, "<paths>...", //$NON-NLS-1$
"[--mixed | --soft | --hard]")); //$NON-NLS-1$
filepaths.add(path);
return this;
untrackedCommit = revWalk.parseCommit(stashCommit.getParent(2));
ResolveMerger merger = (ResolveMerger) strategy.newMerger(repo);
- merger.setCommitNames(new String[] { "stashed HEAD", "HEAD",
- "stash" });
+ merger.setCommitNames(new String[] { "stashed HEAD", "HEAD", //$NON-NLS-1$ //$NON-NLS-2$
+ "stash" }); //$NON-NLS-1$
merger.setBase(stashHeadCommit);
merger.setWorkingTreeIterator(new FileTreeIterator(repo));
if (merger.merge(headCommit, stashCommit)) {
if (applyIndex) {
ResolveMerger ixMerger = (ResolveMerger) strategy
.newMerger(repo, true);
- ixMerger.setCommitNames(new String[] { "stashed HEAD",
- "HEAD", "stashed index" });
+ ixMerger.setCommitNames(new String[] { "stashed HEAD", //$NON-NLS-1$
+ "HEAD", "stashed index" }); //$NON-NLS-1$//$NON-NLS-2$
ixMerger.setBase(stashHeadCommit);
boolean ok = ixMerger.merge(headCommit, stashIndexCommit);
if (ok) {
*/
public class StashCreateCommand extends GitCommand<RevCommit> {
- private static final String MSG_INDEX = "index on {0}: {1} {2}";
+ private static final String MSG_INDEX = "index on {0}: {1} {2}"; //$NON-NLS-1$
- private static final String MSG_UNTRACKED = "untracked files on {0}: {1} {2}";
+ private static final String MSG_UNTRACKED = "untracked files on {0}: {1} {2}"; //$NON-NLS-1$
- private static final String MSG_WORKING_DIR = "WIP on {0}: {1} {2}";
+ private static final String MSG_WORKING_DIR = "WIP on {0}: {1} {2}"; //$NON-NLS-1$
private String indexMessage = MSG_INDEX;
if (tagger == null && annotated)
tagger = new PersonIdent(repo);
if (name == null || !Repository.isValidRefName(Constants.R_TAGS + name))
- throw new InvalidTagNameException(MessageFormat.format(JGitText
- .get().tagNameInvalid, name == null ? "<null>" : name));
+ throw new InvalidTagNameException(
+ MessageFormat.format(JGitText.get().tagNameInvalid,
+ name == null ? "<null>" : name)); //$NON-NLS-1$
if (signed)
throw new UnsupportedOperationException(
JGitText.get().signingNotSupportedOnTag);
private String toResultString(final Result status) {
switch (status) {
case FORCED:
- return "forced-update";
+ return "forced-update"; //$NON-NLS-1$
case FAST_FORWARD:
- return "fast forward";
+ return "fast forward"; //$NON-NLS-1$
case NEW:
- return "created";
+ return "created"; //$NON-NLS-1$
default:
return null;
}
List<String> listings = new ArrayList<String>();
if (!branches.isEmpty())
- listings.add(joinNames(branches, "branch", "branches"));
+ listings.add(joinNames(branches, "branch", "branches")); //$NON-NLS-1$//$NON-NLS-2$
if (!remoteBranches.isEmpty())
- listings.add(joinNames(remoteBranches, "remote-tracking branch",
- "remote-tracking branches"));
+ listings.add(joinNames(remoteBranches, "remote-tracking branch", //$NON-NLS-1$
+ "remote-tracking branches")); //$NON-NLS-1$
if (!tags.isEmpty())
- listings.add(joinNames(tags, "tag", "tags"));
+ listings.add(joinNames(tags, "tag", "tags")); //$NON-NLS-1$ //$NON-NLS-2$
if (!commits.isEmpty())
- listings.add(joinNames(commits, "commit", "commits"));
+ listings.add(joinNames(commits, "commit", "commits")); //$NON-NLS-1$ //$NON-NLS-2$
if (!others.isEmpty())
- listings.add(StringUtils.join(others, ", ", " and ")); //$NON-NLS-1$
+ listings.add(StringUtils.join(others, ", ", " and ")); //$NON-NLS-1$ //$NON-NLS-2$
sb.append(StringUtils.join(listings, ", ")); //$NON-NLS-1$
String targetName = target.getLeaf().getName();
if (!targetName.equals(Constants.R_HEADS + Constants.MASTER)) {
String targetShortName = Repository.shortenRefName(targetName);
- sb.append(" into " + targetShortName);
+ sb.append(" into " + targetShortName); //$NON-NLS-1$
}
return sb.toString();
*/
public String format(List<RevCommit> squashedCommits, Ref target) {
StringBuilder sb = new StringBuilder();
- sb.append("Squashed commit of the following:\n");
+ sb.append("Squashed commit of the following:\n"); //$NON-NLS-1$
for (RevCommit c : squashedCommits) {
- sb.append("\ncommit ");
+ sb.append("\ncommit "); //$NON-NLS-1$
sb.append(c.getName());
sb.append("\n"); //$NON-NLS-1$
sb.append(toString(c.getAuthorIdent()));
private String toString(PersonIdent author) {
final StringBuilder a = new StringBuilder();
- a.append("Author: ");
+ a.append("Author: "); //$NON-NLS-1$
a.append(author.getName());
a.append(" <"); //$NON-NLS-1$
a.append(author.getEmailAddress());
a.append(">\n"); //$NON-NLS-1$
- a.append("Date: ");
+ a.append("Date: "); //$NON-NLS-1$
a.append(dateFormatter.formatDate(author));
a.append("\n"); //$NON-NLS-1$
@Override
public String getName() {
- return "recursive";
+ return "recursive"; //$NON-NLS-1$
}
}