1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

git-llvm: Give "push" a --force flag to disable confirm prompt on multiple commits

llvm-svn: 369538
This commit is contained in:
Nico Weber 2019-08-21 15:41:20 +00:00
parent a3b42d6afd
commit e291923878

View File

@ -471,7 +471,7 @@ def cmd_push(args):
for c in revs)))
# Ask confirmation if multiple commits are about to be pushed
if len(revs) != 1:
if not args.force and len(revs) != 1:
if not ask_confirm("Are you sure you want to create %d commits?" % len(revs)):
die("Aborting")
@ -626,6 +626,11 @@ if __name__ == '__main__':
help='Do everything other than commit to svn. Leaves junk in the svn '
'repo, so probably will not work well if you try to commit more '
'than one rev.')
parser_push.add_argument(
'-f',
'--force',
action='store_true',
help='Do not ask for confirmation when pushing multiple commits.')
parser_push.add_argument(
'rev_range',
metavar='GIT_REVS',