Fix memory management in GitRepository::parseCommit