Correct order of ref and hash in diff