diff options
author | Christian Halstrick <christian.halstrick@sap.com> | 2012-05-08 14:25:46 +0200 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2012-06-04 07:52:36 -0700 |
commit | 0f84b86e01da4680633c32bad101d021e0cb98ad (patch) | |
tree | 4f443d608f2fd95f43026954c79c0d60536ce0d7 /org.eclipse.jgit/src/org/eclipse/jgit | |
parent | bc7817c9436756bec3ffe88dc0ef75881d4b9478 (diff) | |
download | jgit-0f84b86e01da4680633c32bad101d021e0cb98ad.tar.gz jgit-0f84b86e01da4680633c32bad101d021e0cb98ad.zip |
fix PackWriter excluded objects handling
PackWriter supports excluding objects from being written to the pack.
You may specify a PackIndex which lists all those objects which should
not go into the new pack. This feature was broken because not all
commits have been checked whether they should be excluded or not. For
other object types the exclude algorithm worked. This commit adds the
missing check.
Change-Id: Id0047098393641ccba784c58b8325175c22fcece
Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java b/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java index 03cf649a29..d93e2d6805 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java @@ -1660,7 +1660,8 @@ public class PackWriter { for (int i = 0; i < cmit.getParentCount(); i++) { RevCommit p = cmit.getParent(i); - if (!p.has(added) && !p.has(RevFlag.UNINTERESTING)) { + if (!p.has(added) && !p.has(RevFlag.UNINTERESTING) + && !exclude(p)) { p.add(added); addObject(p, 0); commitCnt++; |