Fix getAllcommitIds bug in empty repository