For whatever reasons, imports of commits in Diffusion can get stuck, displaying Still Importing... This commit is still importing. Changes will be visible once the import finishes.
Using the "Skip past this commit" button in a file in Diffusion trying to access the past of such a non-imported commit, Phabricator throws a RuntimeException.
Avoid throwing the RuntimeException by handling the situation more gracefully: When the SQL query in loadCommitSequence() does not return a result, $path_change is null. Thus do not crash trying to reset($path_change) but return null, and handle null accordingly in loadOldFilename() which is the only caller of loadCommitSequence().
EXCEPTION: (RuntimeException) reset() expects parameter 1 to be array, null given at [<arcanist>/src/error/PhutilErrorHandler.php:273] #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer, array) called at [<arcanist>/src/error/PhutilErrorHandler.php:273] #1 <#2> reset(NULL) called at [<phorge>/src/applications/diffusion/query/DiffusionRenameHistoryQuery.php:100]
Closes T15888