Commit f8e90b9
contrib/subtree: reduce function side-effects
`process_subtree_split_trailer()` communicates its return value
to the caller by setting a variable (`sub`) that is also defined
by the calling function. This is both unclear and encourages
side-effects.
Invoke this function in a sub-shell instead.
Signed-off-by: Colin Stagner <ask+git@howdoi.land>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 628a66c commit f8e90b9
1 file changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
373 | 373 | | |
374 | 374 | | |
375 | 375 | | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
376 | 380 | | |
377 | 381 | | |
378 | 382 | | |
| |||
400 | 404 | | |
401 | 405 | | |
402 | 406 | | |
| 407 | + | |
403 | 408 | | |
404 | 409 | | |
405 | 410 | | |
| |||
432 | 437 | | |
433 | 438 | | |
434 | 439 | | |
435 | | - | |
| 440 | + | |
436 | 441 | | |
437 | 442 | | |
438 | 443 | | |
| |||
489 | 494 | | |
490 | 495 | | |
491 | 496 | | |
492 | | - | |
| 497 | + | |
493 | 498 | | |
494 | 499 | | |
495 | 500 | | |
| |||
0 commit comments