In the Git staging view, opening a comparison for a changed file would fail with a NullPointerException from trying to read the contents of an IStorage for the "origin" side of the comparison, which doesn't exist.
To handle this, instead of using a given IStorage directly, make sure a file for it actually exists by re-loading it from the IStorageProviderAccessor by name.
In the Git staging view, opening a comparison for a changed file would fail with a
NullPointerException
from trying to read the contents of anIStorage
for the "origin" side of the comparison, which doesn't exist.To handle this, instead of using a given
IStorage
directly, make sure a file for it actually exists by re-loading it from theIStorageProviderAccessor
by name.