summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorMinh Thai <mthai@google.com>2018-03-22 17:11:45 -0700
committerMinh Thai <mthai@google.com>2018-03-22 17:11:45 -0700
commitbf8057058e126f7ca325d6a45b96de73ddd14844 (patch)
treed5756be8dbc2b99ca7adcb8b856a50287c5594be /org.eclipse.jgit
parent901e663a66954c1f46ae0d3b605e8a12b4b86ee5 (diff)
downloadjgit-bf8057058e126f7ca325d6a45b96de73ddd14844.tar.gz
jgit-bf8057058e126f7ca325d6a45b96de73ddd14844.zip
scanPacks to return reftables even if no packs
An empty repository may have a dangling symref HEAD pointing to refs/heads/master. In this case, there will be a reftable even though there are no packs yet. Change-Id: Ib759ffbbfc490953481853e74263dd46d2592888 Signed-off-by: Minh Thai <mthai@google.com>
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjDatabase.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjDatabase.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjDatabase.java
index 42b1a479d8..8e9ed5d0d8 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjDatabase.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjDatabase.java
@@ -546,7 +546,7 @@ public abstract class DfsObjDatabase extends ObjectDatabase {
}
}
- if (newPacks.isEmpty())
+ if (newPacks.isEmpty() && newReftables.isEmpty())
return new PackListImpl(NO_PACKS.packs, NO_PACKS.reftables);
if (!foundNew) {
old.clearDirty();