You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RefDirectory:pack might raise an NPE when deleting loose refs as final part of the RefDirectory.pack():
java.lang.NullPointerException
at org.eclipse.jgit.internal.storage.file.RefDirectory.pack(RefDirectory.java:817)
at org.eclipse.jgit.internal.storage.file.RefDirectory.pack(RefDirectory.java:729)
at org.eclipse.jgit.internal.storage.file.PackedBatchRefUpdate.execute(PackedBatchRefUpdate.java:153)
at org.eclipse.jgit.lib.BatchRefUpdate.execute(BatchRefUpdate.java:589)
at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:249)
at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:105)
at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1462)
at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1390)
This is happening because the code correctly locks the packed-refs file in RefDirectory:pack.
However, it makes the wrong assumption considering the loose refs set as immutable between during the whole packing process.
The number and values of loose refs on the filesystem can mutate at any time whilst the RefDirectory.pack() is in progress.
Assuming the contrary can lead to an NPE.
The text was updated successfully, but these errors were encountered:
RefDirectory:pack might raise an NPE when deleting loose refs as final part of the RefDirectory.pack():
This is happening because the code correctly locks the packed-refs file in RefDirectory:pack.
However, it makes the wrong assumption considering the loose refs set as immutable between during the whole packing process.
The number and values of loose refs on the filesystem can mutate at any time whilst the RefDirectory.pack() is in progress.
Assuming the contrary can lead to an NPE.
The text was updated successfully, but these errors were encountered: