

def _add_file(self, filename, repo_path, commit_msg=None, content='', target=None):
    if target:
        check_output(['ln', '-s', target, filename], cwd=content)
    else:
        with open(os.path.join(repo_path, filename), 'w') as f:
            f.write(content)
    check_call(['git', 'add', filename], cwd=repo_path)
    check_call(['git', 'commit', '-m', commit_msg], cwd=repo_path)

dataset/ETHPy150Open dropbox/changes/tests/changes/vcs/test_git.py GitVcsTest._add_file/VarMisuse@45/58 `repo_path`->`content`