<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update(self, repo_dir, **kwargs):
 """This function updates an existing checkout of source code."""

        del kwargs
        rev = self._args.get("revision")
        if rev:
            return [{"args": ["git", "checkout", rev], "cwd": repo_dir}] + _ff_command(
                rev, repo_dir
            )
        return None