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>
This commit is contained in:
parent
86ecf141b6
commit
489604aaad
|
@ -199,9 +199,11 @@ else if (revLimiter.size() > 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
protected RevWalk createWalk() {
|
protected RevWalk createWalk() {
|
||||||
if (argWalk == null)
|
if (objects)
|
||||||
argWalk = objects ? new ObjectWalk(db) : new RevWalk(db);
|
return new ObjectWalk(db);
|
||||||
return argWalk;
|
if (argWalk != null)
|
||||||
|
return argWalk;
|
||||||
|
return new RevWalk(db);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected int walkLoop() throws Exception {
|
protected int walkLoop() throws Exception {
|
||||||
|
|
Loading…
Reference in New Issue