This can reduce unexpectedly pushing more than expected for users.
Shouldn't the message be more descriptive? Maybe it should be "Multiple commits are about to be pushed. Are you sure?" The mailing list thread was specifically for newer contributors, right? I could imagine someone using git llvm push for the first time would imagine that was a normal message that is always given.
Maybe "Did not proceed with pushing multiple commits" or at least "Aborting". Although I'm not sure any message is needed, probably just exiting is ok too.
Change abort message to "Aborting"
It works for me in the current version with python 2.7 and 3.7 on MacOS
The output would be:
Pushing 2 monorepo commits: 31a4e7393ea7 Ask confirmation when `git llvm push` will push multiple commits c5eb9c5e2018 dummy Are you sure? (y/n):
I used read_input instead of input for the local variable name otherwise Python complains about using a variable before defining it, PTAL.
Output is now:
Pushing 2 monorepo commits: b28f3db64111 Fix `git llvm` script when no arguments are supplied on Python 3 aeef6550de82 Ask confirmation when `git llvm push` will push multiple commits Are you sure you want to create 2 commits? (y/N):