]> source.dussan.org Git - jgit.git/commit
Add retainOnReset(RevFlag) to RevWalk to simplify reset usage 79/35079/2
authorShawn Pearce <spearce@spearce.org>
Fri, 17 Oct 2014 21:17:23 +0000 (14:17 -0700)
committerShawn Pearce <spearce@spearce.org>
Sun, 19 Oct 2014 18:36:08 +0000 (11:36 -0700)
commit048dbf41735175de77f60dc55dba9ae6c8a65317
treef6d206ec7d56023b9dce07ba5a7fdf786099859f
parent5c85d5d58adbe415c217e45aa365892f2ca9fd0c
Add retainOnReset(RevFlag) to RevWalk to simplify reset usage

Applications sometimes use a RevFlag instead of a Set<RevObject>
to track boolean state bits about objects being processed. However
this requires careful use of the resetRetain() methods to avoid an
accidental clearing of the RevFlag bits, effectively clearing the
Set<RevObject> the application wanted to track.

Simplify that use case by offering retainOnReset, a collection of
flags that are never cleared by the RevWalk.

Change-Id: I4c05b89b1398e4a4f371eac3a5d1d5edddec838f
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java