Browse Source

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>
tags/v1.1.0.201109011030-rc2
Shawn O. Pearce 12 years ago
parent
commit
489604aaad

+ 5
- 3
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java View File

@@ -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 {

Loading…
Cancel
Save