[llvm] r369538 - git-llvm: Give "push" a --force flag to disable confirm prompt on multiple commits
Nico Weber via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 21 08:41:20 PDT 2019
Author: nico
Date: Wed Aug 21 08:41:20 2019
New Revision: 369538
URL: http://llvm.org/viewvc/llvm-project?rev=369538&view=rev
Log:
git-llvm: Give "push" a --force flag to disable confirm prompt on multiple commits
Modified:
llvm/trunk/utils/git-svn/git-llvm
Modified: llvm/trunk/utils/git-svn/git-llvm
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/git-svn/git-llvm?rev=369538&r1=369537&r2=369538&view=diff
==============================================================================
--- llvm/trunk/utils/git-svn/git-llvm (original)
+++ llvm/trunk/utils/git-svn/git-llvm Wed Aug 21 08:41:20 2019
@@ -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")
@@ -627,6 +627,11 @@ if __name__ == '__main__':
'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',
type=str,
More information about the llvm-commits
mailing list