[PATCH] D64893: Ask confirmation when `git llvm push` will push multiple commits
Mehdi AMINI via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 17 22:19:25 PDT 2019
mehdi_amini added inline comments.
================
Comment at: llvm/utils/git-svn/git-llvm:107
+ else:
+ input = builtins.input
+
----------------
abrachet wrote:
> mehdi_amini wrote:
> > This does not work for me, if anyone can help?
> Are you also getting a NameError? I'm not sure why this is (I don't know much about Python), but I can say that using raw_input works as expected.
It works for me in the current version with python 2.7 and 3.7 on MacOS
================
Comment at: llvm/utils/git-svn/git-llvm:453
+ if len(revs) != 1:
+ if not ask_confirm("Are you sure?"):
+ die("abort")
----------------
abrachet wrote:
> 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.
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):
```
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64893/new/
https://reviews.llvm.org/D64893
More information about the llvm-commits
mailing list