Give deepened commits a uniform appearance

This commit is contained in:
Elliot Nunn 2019-04-04 22:33:33 +08:00
parent 69cecde571
commit 96045f0dc9

View File

@ -33,6 +33,8 @@ assert path.exists(args.patchset)
assert not path.exists(path.join(args.patchset, '.git')) # protect against argument swap
horst = ['-c', 'user.name=Horst Beepmanh', '-c', 'user.email=<>']
makedirs(args.worktree, exist_ok=True)
run(['git', 'init'], cwd=args.worktree, check=True)
@ -63,9 +65,9 @@ else:
copy(path.join(walk_base, this_file), other_dir)
run(['git', 'add', '.'], cwd=args.worktree, check=True)
run(['git', 'commit', '-m', path.basename(args.base)], cwd=args.worktree, check=True)
run(['git', *horst, 'commit', '-m', path.basename(args.base)], 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']
run(['git', 'am', *patchfiles], cwd=args.worktree, check=True)
run(['git', *horst, 'am', *patchfiles], cwd=args.worktree, check=True)