fix the crash when a brand new repository has no ref
close pending changes and commit details when opening new repository
add ./ to file path when displaying file from a revision