зеркало из https://github.com/electron/electron.git
build: minor fixes to git-export-patches (#17276)
* fix: make export-patches robust to tags with dashes * fix: --output is a required parameter of export-patches
This commit is contained in:
Родитель
ca2c345997
Коммит
825e526456
|
@ -16,7 +16,7 @@ def guess_base_commit(repo):
|
|||
'describe',
|
||||
'--tags',
|
||||
]
|
||||
return subprocess.check_output(args).split('-')[0:2]
|
||||
return subprocess.check_output(args).rsplit('-', 2)[0:2]
|
||||
|
||||
|
||||
def format_patch(repo, since):
|
||||
|
@ -92,7 +92,8 @@ def remove_patch_filename(patch):
|
|||
def main(argv):
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("-o", "--output",
|
||||
help="directory into which exported patches will be written")
|
||||
help="directory into which exported patches will be written",
|
||||
required=True)
|
||||
parser.add_argument("patch_range",
|
||||
nargs='?',
|
||||
help="range of patches to export. Defaults to all commits since the "
|
||||
|
|
Загрузка…
Ссылка в новой задаче