Merge "Command line: implement checkout -- <path>"
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java
index e444d21..4b16ed8 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java
@@ -53,6 +53,7 @@
import org.eclipse.jgit.treewalk.AbstractTreeIterator;
import org.eclipse.jgit.treewalk.TreeWalk;
import org.eclipse.jgit.treewalk.filter.PathFilterGroup;
+import org.eclipse.jgit.util.QuotedString;
import org.kohsuke.args4j.Argument;
import org.kohsuke.args4j.Option;
import org.kohsuke.args4j.spi.StopOptionHandler;
@@ -90,7 +91,7 @@ protected void run() throws Exception {
outw.print(walk.getObjectId(0).name());
outw.print('\t');
- outw.print(walk.getPathString());
+ outw.print(QuotedString.GIT_PATH.quote(walk.getPathString()));
outw.println();
}
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java
index 95551c3..8277ead 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java
@@ -145,6 +145,8 @@ public class RebaseCommand extends GitCommand<RebaseResult> {
private static final String INTERACTIVE = "interactive"; //$NON-NLS-1$
+ private static final String QUIET = "quiet"; //$NON-NLS-1$
+
private static final String MESSAGE = "message"; //$NON-NLS-1$
private static final String ONTO = "onto"; //$NON-NLS-1$
@@ -928,6 +930,7 @@ else if (!isInteractive() && walk.isMergedInto(headCommit, upstream)) {
rebaseState.createFile(ONTO, upstreamCommit.name());
rebaseState.createFile(ONTO_NAME, upstreamCommitName);
rebaseState.createFile(INTERACTIVE, ""); //$NON-NLS-1$
+ rebaseState.createFile(QUIET, ""); //$NON-NLS-1$
ArrayList<RebaseTodoLine> toDoSteps = new ArrayList<RebaseTodoLine>();
toDoSteps.add(new RebaseTodoLine("# Created by EGit: rebasing " + headId.name() //$NON-NLS-1$
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/StashDropCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/StashDropCommand.java
index e4431c3..6cbcd06 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/StashDropCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/StashDropCommand.java
@@ -219,7 +219,7 @@ public ObjectId call() throws GitAPIException {
FileUtils.delete(stashFile);
if (!stashLockFile.renameTo(stashFile))
throw new JGitInternalException(MessageFormat.format(
- JGitText.get().couldNotWriteFile,
+ JGitText.get().renameFileFailed,
stashLockFile.getPath(), stashFile.getPath()));
}
} catch (IOException e) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java
index 5275b4c..fdf8c05 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java
@@ -1154,7 +1154,7 @@ public static void checkoutEntry(final Repository repo, File f,
FileUtils.rename(tmpFile, f);
} catch (IOException e) {
throw new IOException(MessageFormat.format(
- JGitText.get().couldNotWriteFile, tmpFile.getPath(),
+ JGitText.get().renameFileFailed, tmpFile.getPath(),
f.getPath()));
}
}