]> source.dussan.org Git - jgit.git/commit
UploadPack: Fix NPE when traversing a tag chain 08/201108/6
authorKaushik Lingarkar <quic_kaushikl@quicinc.com>
Wed, 5 Apr 2023 01:05:53 +0000 (18:05 -0700)
committerMatthias Sohn <matthias.sohn@sap.com>
Fri, 21 Apr 2023 00:04:35 +0000 (02:04 +0200)
commit064691e90c4cbf1c550cb65b41b91e6fa07c7c81
tree6bb0e40518559a40ead86618eef7a607c52311db
parent40daa780ef00f999b9e95417a9ee15355d591955
UploadPack: Fix NPE when traversing a tag chain

Always parse RevTags including their body before getting their object
to ensure that non-cached objects are handled correctly when traversing
a tag chain. An NPE in UploadPack#addTagChain will occur on a depth=1
fetch of a branch containing a tag chain and the ref to one of the
middle tags in the chain is deleted.

Change-Id: Ifd8fe868869070b365df926fec5dcd8e64d4f521
Signed-off-by: Kaushik Lingarkar <quic_kaushikl@quicinc.com>
org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java