From 84c80be1dc45885969e2d0fa0421f709b8706453 Mon Sep 17 00:00:00 2001 From: Dave Borowitz Date: Tue, 13 Dec 2011 11:00:19 -0800 Subject: Fire DfsPacksChangedEvents when committing packs. Once a pack has been committed with commitPack(), we know that the pack list has changed but we don't re-scan the underlying storage. Change-Id: Ia7b35df4442a5f5dfe7e817edcc77b44b5410d08 --- .../eclipse/jgit/storage/dfs/DfsObjDatabase.java | 24 +++++++++++++++++++++- .../jgit/storage/dfs/InMemoryRepository.java | 2 +- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/storage/dfs/DfsObjDatabase.java b/org.eclipse.jgit/src/org/eclipse/jgit/storage/dfs/DfsObjDatabase.java index 286616e795..b1290d955e 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/storage/dfs/DfsObjDatabase.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/storage/dfs/DfsObjDatabase.java @@ -198,6 +198,10 @@ public abstract class DfsObjDatabase extends ObjectDatabase { * During pack compaction or GC the new pack file may be replacing other * older files. Implementations should remove those older files (if any) as * part of the commit of the new file. + *
+ * This method is a trivial wrapper around
+ * {@link #commitPackImpl(Collection, Collection)} that calls the
+ * implementation and fires events.
*
* @param desc
* description of the new packs.
@@ -207,7 +211,25 @@ public abstract class DfsObjDatabase extends ObjectDatabase {
* the packs cannot be committed. On failure a rollback must
* also be attempted by the caller.
*/
- protected abstract void commitPack(Collection