diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java index 15bdf9618..35c52bdfe 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java @@ -592,7 +592,7 @@ public class ReceivePack { refs = db.getAllRefs(); final Ref head = refs.remove(Constants.HEAD); adv.send(refs); - if (!head.isSymbolic()) + if (head != null && !head.isSymbolic()) adv.advertiseHave(head.getObjectId()); adv.includeAdditionalHaves(); if (adv.isEmpty())