<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def record_git_info(self, commit=None):
 """ Record git meta information. Parameters commit : str, optional Unique hexsha of the desired commit. Returns ------- GitInfo Git commit meta information. """

        if commit is None:
            commit = self._repo.head.commit
        else:
            commit = self._repo.commit(commit)
        return GitInfo(
            hexsha=commit.hexsha,
            author=commit.author.name,
            email=commit.author.email,
            authored_on=commit.authored_datetime
        )