summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2011-08-13 16:59:52 -0400
committerCode Review <codereview-daemon@eclipse.org>2011-08-13 16:59:52 -0400
commit895af1480d593d3c2cb4336875c163e47c42e52f (patch)
treee28ff2030291de7d6807bd7856da66c5bcaae08e
parent5a3a2b53eec76e914bf54848dc88a55ac7e347f7 (diff)
parent489604aaad8ef8d252bf31056db4de01e690fa0b (diff)
downloadjgit-895af1480d593d3c2cb4336875c163e47c42e52f.tar.gz
jgit-895af1480d593d3c2cb4336875c163e47c42e52f.zip
Merge "Fix jgit rev-list --objects master"
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java
index 474e974cd1..715cb71b43 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java
@@ -199,9 +199,11 @@ abstract class RevWalkTextBuiltin extends TextBuiltin {
}
protected RevWalk createWalk() {
- if (argWalk == null)
- argWalk = objects ? new ObjectWalk(db) : new RevWalk(db);
- return argWalk;
+ if (objects)
+ return new ObjectWalk(db);
+ if (argWalk != null)
+ return argWalk;
+ return new RevWalk(db);
}
protected int walkLoop() throws Exception {