Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork939
Commitbdabb21
committed
Expand USE_SHELL docstring; clarify a test usage
In the USE_SHELL docstring:- Restore the older wording "when executing git commands" rather than "to execute git commands". I've realized that longer phrase, which dates back to the introduction of USE_SHELL in1c2dd54, is clearer, because readers less familiar with GitPython's overall design and operation will still not be misled into thinking USE_SHELL ever affects whether GitPython uses an external git command, versus some other mechanism, to do something.- Give some more information about why USE_SHELL = True is unsafe (though further revision or clarification may be called for).- Note some non-obvious aspects of USE_SHELL, that some of the way it interacts with other aspects of GitPython is not part of what is or has been documented about it, and in practice changes over time. The first example relates to#1792; the second may help users understand why code that enables USE_SHELL on Windows, in addition to being unsafe there, often breaks immediately on other platforms; the third is included so the warnings in the expanded docstring are not interpreted as a new commitment that any shell syntax that may have a *desired* effect in some application will continue to have the same effect in the future.- Cover a second application that might lead, or have led, to setting USE_SHELL to True, and explain what to do instead.In test_successful_default_refresh_invalidates_cached_version_info:- Rewrite the commented explanation of a special variant of that second application, where the usual easy alternatives are not used because part of the goal of the test is to check a "default" scenario that does not include either of them. This better explains why that choice is made in the test, and also hopefully will prevent anyone from thinking that test is a model for another situation (which, as noted, is unlikely to be the case even in unit tests).1 parent3da47c2 commitbdabb21
2 files changed
+38
-16
lines changedLines changed: 31 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
405 | 405 |
| |
406 | 406 |
| |
407 | 407 |
| |
408 |
| - | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
409 | 428 |
| |
410 | 429 |
| |
411 | 430 |
| |
412 | 431 |
| |
413 | 432 |
| |
414 | 433 |
| |
415 |
| - | |
416 |
| - | |
417 |
| - | |
418 |
| - | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
419 | 439 |
| |
420 |
| - | |
| 440 | + | |
421 | 441 |
| |
422 |
| - | |
423 |
| - | |
424 |
| - | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
425 | 447 |
| |
426 | 448 |
| |
427 | 449 |
| |
|
Lines changed: 7 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
669 | 669 |
| |
670 | 670 |
| |
671 | 671 |
| |
672 |
| - | |
673 |
| - | |
674 |
| - | |
675 |
| - | |
676 |
| - | |
677 |
| - | |
678 |
| - | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
679 | 679 |
| |
680 | 680 |
| |
681 | 681 |
| |
|
0 commit comments
Comments
(0)