From ecad2ff6db8b7af453022c533d5fca0eaaa90b30 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Wed, 21 Aug 2019 15:41:20 +0000 Subject: [PATCH] git-llvm: Give "push" a --force flag to disable confirm prompt on multiple commits git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369538 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/git-svn/git-llvm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/utils/git-svn/git-llvm b/utils/git-svn/git-llvm index 0d1220e845c..e30d17c78a1 100755 --- a/utils/git-svn/git-llvm +++ b/utils/git-svn/git-llvm @@ -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', -- 2.40.0