Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork941
Commitf556490
committed
Clarify
This is a minor refactor of how `_warn_use_shell` can be, and is,invoked.The `_warn_use_shell` helper function in `git.cmd` takes a single`bool`-valued argumnet `extra_danger`, which is conceptuallyassociated with having a `True` value of `USE_SHELL`, but theassociation is not necessarily obvious. Specifically:- For the warning given when reading `USE_SHELL` on the `Git` class or through an instance, `extra_danger` is always `False`. This is so even if the `USE_SHELL` value is currently `True`, because the danger that arises from `True` occurs internally.- For the warning given when writing `USE_SHELL`, which can only be done on the `Git` class and not on or through an instance, `extra_danger` is the value set for the attribute. This is because setting `USE_SHELL` to `True` incurs the danger described in#1896.When reading the code, which passed `extra_danger` positionally,the meaning of the parameter may not always have been obvious.This makes the `extra_danger` parameter keyword-only, and passesit by keyword in all invocations, so that its meaning is clearer.USE_SHELL
warning helper signature1 parentb6a188b commitf556490
1 file changed
+4
-4
lines changedLines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
550 | 550 |
| |
551 | 551 |
| |
552 | 552 |
| |
553 |
| - | |
| 553 | + | |
554 | 554 |
| |
555 | 555 |
| |
556 | 556 |
| |
| |||
566 | 566 |
| |
567 | 567 |
| |
568 | 568 |
| |
569 |
| - | |
| 569 | + | |
570 | 570 |
| |
571 | 571 |
| |
572 | 572 |
| |
573 | 573 |
| |
574 |
| - | |
| 574 | + | |
575 | 575 |
| |
576 | 576 |
| |
577 | 577 |
| |
| |||
988 | 988 |
| |
989 | 989 |
| |
990 | 990 |
| |
991 |
| - | |
| 991 | + | |
992 | 992 |
| |
993 | 993 |
| |
994 | 994 |
| |
|
0 commit comments
Comments
(0)