def commit_signature(vcs, user_config, signature):
if signature not in get_staged_signatures(vcs):<EOL><INDENT>raise NotStagedError<EOL><DEDENT>evidence_path = _get_committed_history_path(vcs)<EOL>committed_signatures = get_committed_signatures(vcs)<EOL>if signature in committed_signatures:<EOL><INDENT>raise AlreadyCommittedError<EOL><DEDENT>committed_signatures.append(signature)<EOL>string = '<STR_LIT:\n>'.join(committed_signatures[-user_config['<STR_LIT>']:])<EOL>with open(evidence_path, '<STR_LIT:w>') as f:<EOL><INDENT>f.write(string)<EOL><DEDENT>unstage_signature(vcs, signature)<EOL>
Add `signature` to the list of committed signatures

    The signature must already be staged

    Args:
        vcs (easyci.vcs.base.Vcs)
        user_config (dict)
        signature (basestring)

    Raises:
        NotStagedError
        AlreadyCommittedError