git.remove_config('core.bare', tree=wgitdir) git.set_origin(output, wgitdir) env = make_proxy_env(True) kernel_head = git.ls_remote(branch, tree=kernelobjdir, env=env) backport_author_env = { 'GIT_AUTHOR_NAME': SCRIPT_GIT_NAME, 'GIT_AUTHOR_EMAIL': SCRIPT_GIT_EMAIL, } old_data = {} try: msg = git.commit_message('HEAD', wgitdir) for line in msg.split('\n'): line = line.strip() if line.startswith(PREFIX): k, v = line[len(PREFIX):].split(':') k = k.strip() v = v.strip() old_data[k] = v except git.ExecutionError: # the repository is probably still empty ... pass if not 'backport' in old_data or not tree in old_data: # assume it's all new, don't log anything ... handle_commit( args, "Initialize backport branch\n\nCreate the new git tracker backport branch.",
git.clone(output, wgitdir, ['--reference', wgitref, '--bare', '--single-branch', '--branch', branch]) git.remove_config('core.bare', tree=wgitdir) git.set_origin(output, wgitdir) env = make_proxy_env(True) kernel_head = git.ls_remote(branch, tree=kernelobjdir, env=env) backport_author_env = { 'GIT_AUTHOR_NAME': SCRIPT_GIT_NAME, 'GIT_AUTHOR_EMAIL': SCRIPT_GIT_EMAIL, } old_data = {} try: msg = git.commit_message('HEAD', wgitdir) for line in msg.split('\n'): line = line.strip() if line.startswith(PREFIX): k, v = line[len(PREFIX):].split(':') k = k.strip() v = v.strip() old_data[k] = v except git.ExecutionError: # the repository is probably still empty ... pass if not 'backport' in old_data or not tree in old_data: # assume it's all new, don't log anything ... handle_commit(args, "Initialize backport branch\n\nCreate the new git tracker backport branch.", branch, tree, kernelobjdir, branch_tmpdir, wgitdir, backport_rev,