diff options
author | David Pursehouse <david.pursehouse@gmail.com> | 2018-04-09 16:40:37 +0900 |
---|---|---|
committer | David Pursehouse <david.pursehouse@gmail.com> | 2018-04-09 16:40:42 +0900 |
commit | 045799f2ec6b8e9143cf88c3ff1c63c45420ea12 (patch) | |
tree | 6468781bec0f2f0375088f20898b5c5129b19132 /org.eclipse.jgit.lfs/src | |
parent | a5db080af01d494487ac1675e8856e88a20d696b (diff) | |
parent | 312e61a3737531c0bca2ace28a816edf6da59c64 (diff) | |
download | jgit-045799f2ec6b8e9143cf88c3ff1c63c45420ea12.tar.gz jgit-045799f2ec6b8e9143cf88c3ff1c63c45420ea12.zip |
Merge branch 'stable-4.11'
* stable-4.11:
LFS: Fix potential NPE in LfsPrePushHook
Change-Id: If721bd18035870541d216d2dcd9d47484e9af3e5
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.lfs/src')
-rw-r--r-- | org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPrePushHook.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPrePushHook.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPrePushHook.java index 7fd7c216ac..c11ddbee25 100644 --- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPrePushHook.java +++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPrePushHook.java @@ -180,6 +180,10 @@ public class LfsPrePushHook extends PrePushHook { 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) { |