diff options
author | Zhen Chen <czhen@google.com> | 2017-11-07 12:48:47 -0800 |
---|---|---|
committer | Zhen Chen <czhen@google.com> | 2017-11-07 14:12:19 -0800 |
commit | fdf8620ec95ad18d698b928b193907e3a3c0558e (patch) | |
tree | 836b165277e9529294fdcd9fe3e4280f053f0268 /org.eclipse.jgit/src | |
parent | 190b575be1fb78f1dc5d0be7f469c2b08f4d614d (diff) | |
download | jgit-fdf8620ec95ad18d698b928b193907e3a3c0558e.tar.gz jgit-fdf8620ec95ad18d698b928b193907e3a3c0558e.zip |
Check non-flushed packs for existence of object
Change-Id: Id466909d70ec6f828c904692139891dec880305e
Signed-off-by: Zhen Chen <czhen@google.com>
Diffstat (limited to 'org.eclipse.jgit/src')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsInserter.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsInserter.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsInserter.java index 19e86522c6..2ea5bdb191 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsInserter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsInserter.java @@ -616,6 +616,12 @@ public class DfsInserter extends ObjectInserter { } @Override + public boolean has(AnyObjectId objectId) throws IOException { + return (objectMap != null && objectMap.contains(objectId)) + || ctx.has(objectId); + } + + @Override public Set<ObjectId> getShallowCommits() throws IOException { return ctx.getShallowCommits(); } |