Exemplo n.º 1
0
def make_repo(tempdir_factory, repo_source):
    path = git_dir(tempdir_factory)
    copy_tree_to_path(get_resource_path(repo_source), path)
    with cwd(path):
        cmd_output('git', 'add', '.')
        cmd_output('git', 'commit', '-m', 'Add hooks')
    return path
Exemplo n.º 2
0
def make_repo(tempdir_factory, repo_source):
    path = git_dir(tempdir_factory)
    copy_tree_to_path(get_resource_path(repo_source), path)
    with cwd(path):
        cmd_output('git', 'add', '.')
        cmd_output('git', 'commit', '-m', 'Add hooks')
    return path
Exemplo n.º 3
0
        def make_local_strategy(directory):
            copy_tree_to_path(resource_filename('empty_template'), directory)

            env = no_git_env()
            name, email = 'pre-commit', '*****@*****.**'
            env['GIT_AUTHOR_NAME'] = env['GIT_COMMITTER_NAME'] = name
            env['GIT_AUTHOR_EMAIL'] = env['GIT_COMMITTER_EMAIL'] = email

            # initialize the git repository so it looks more like cloned repos
            def _git_cmd(*args):
                cmd_output('git', '-C', directory, *args, env=env)

            _git_cmd('init', '.')
            _git_cmd('config', 'remote.origin.url', '<<unknown>>')
            _git_cmd('add', '.')
            _git_cmd('commit', '--no-edit', '--no-gpg-sign', '-n', '-minit')
Exemplo n.º 4
0
 def make_local_strategy(directory):
     copy_tree_to_path(resource_filename('empty_template'), directory)
Exemplo n.º 5
0
 def make_local_strategy(directory):
     copy_tree_to_path(resource_filename('empty_template'), directory)