LFS: Fix potential NPE in LfsPrePushHook

The NPE occurred in conjunction with a symbolic ref (origin/HEAD).

Change-Id: I291636818a121ca00e0df25de5b6fc71a48d447f
Signed-off-by: Markus Duft <markus.duft@ssi-schaefer.com>
This commit is contained in:
Markus Duft 2018-03-20 08:40:14 +01:00 committed by David Pursehouse
parent a263bb1173
commit 312e61a373
1 changed files with 4 additions and 0 deletions

View File

@ -180,6 +180,10 @@ private void excludeRemoteRefs(ObjectWalk walk) throws IOException {
if (oid == null) {
oid = r.getObjectId();
}
if (oid == null) {
// ignore (e.g. symbolic, ...)
continue;
}
RevObject o = walk.parseAny(oid);
if (o.getType() == Constants.OBJ_COMMIT
|| o.getType() == Constants.OBJ_TAG) {