Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn O. Pearce2011-08-08 15:31:30 +0000
committerShawn O. Pearce2011-08-08 15:31:47 +0000
commit489604aaad8ef8d252bf31056db4de01e690fa0b (patch)
treef82d84a2278409cece0dd7bfde41279ae458d71d /org.eclipse.jgit.pgm
parent86ecf141b6e94f18702224e60e8992cafe4d02bc (diff)
downloadjgit-489604aaad8ef8d252bf31056db4de01e690fa0b.tar.gz
jgit-489604aaad8ef8d252bf31056db4de01e690fa0b.tar.xz
jgit-489604aaad8ef8d252bf31056db4de01e690fa0b.zip
Fix jgit rev-list --objects master
This flag was not being honored due to a bug in createWalk(). argWalk is always non-null when there are commits passed in on the command line. If --objects was specified, always make a new ObjectWalk for the actual execution. Change-Id: I6e1a1636f2634605d86671a83766cc1c42939821 Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'org.eclipse.jgit.pgm')
-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 {

Back to the top