mirror of
https://github.com/kp2pml30/git-third-party.git
synced 2026-02-16 23:54:41 +04:00
make patches commit-hash independent
This commit is contained in:
parent
2732cbd9d0
commit
885cfb9023
1 changed files with 1 additions and 1 deletions
|
|
@ -135,7 +135,7 @@ def _save_at(name: str) -> None:
|
|||
patches_dir.joinpath(str(i)).unlink()
|
||||
patches_dir.mkdir(parents=True, exist_ok=True)
|
||||
target_dir = top_dir.joinpath(*name.split('/'))
|
||||
subprocess.run(['git', 'format-patch', f'{conf["commit"]}..HEAD', '--no-numbered', '--numbered-files', '-o', patches_dir], check=True, cwd=target_dir)
|
||||
subprocess.run(['git', 'format-patch', f'{conf["commit"]}..HEAD', '--no-numbered', '--zero-commit', '--numbered-files', '-o', patches_dir], check=True, cwd=target_dir)
|
||||
new_patches = subprocess.run(['git', 'rev-list', '--count', f'{conf["commit"]}..HEAD'], check=True, cwd=target_dir, text=True, capture_output=True)
|
||||
conf['patches'] = int(new_patches.stdout.strip())
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue