Fixed commit hash computation to work for all commit message encodings