Create a gitignore to help building worktrees

This commit is contained in:
Elliot Nunn 2019-04-04 23:01:41 +08:00
parent 68c6093e54
commit 923db3b9bf

View File

@ -67,6 +67,11 @@ else:
run(['git', 'add', '.'], cwd=args.worktree, check=True)
run(['git', *horst, 'commit', '-m', path.basename(args.base)], cwd=args.worktree, check=True)
with open(path.join(args.worktree, '.gitignore'), 'a') as f:
f.write('Build*\n')
run(['git', 'add', '.gitignore'], cwd=args.worktree, check=True)
run(['git', *horst, 'commit', '-m', 'auto-gitignore (do not rebase)'], cwd=args.worktree, check=True)
run(['git', 'tag', args.branch+'-patchset-base'], cwd=args.worktree, check=True)
patchfiles = [path.join(args.patchset, x) for x in sorted(listdir(args.patchset)) if path.splitext(x)[1].lower() == '.patch']