Fix logWalker to not crash on shallow repos