Commit a56eea2
remote: drop free_refspecs() function
We already have free_refspec(), a public function which does
the same thing as the static free_refspecs(). Let's just
keep one. There are two minor differences between the
functions:
1. free_refspecs() is a noop when the refspec argument is
NULL. This probably doesn't matter in practice. The
nr_refspec parameter would presumably be 0 in that
case, skipping the loop. And free(NULL) is explicitly
OK. But it doesn't hurt for us to port this extra
safety to free_refspec(), as one of the callers passes
a funny "i+1" count.
2. The order of arguments is reversed between the two
functions. This patch uses the already-public order of
free_refspec(), as it matches the argument order on the
parsing side.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent b06d364 commit a56eea2
1 file changed
Lines changed: 6 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
477 | 477 | | |
478 | 478 | | |
479 | 479 | | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | 480 | | |
501 | 481 | | |
502 | 482 | | |
| |||
610 | 590 | | |
611 | 591 | | |
612 | 592 | | |
613 | | - | |
| 593 | + | |
614 | 594 | | |
615 | 595 | | |
616 | 596 | | |
| |||
621 | 601 | | |
622 | 602 | | |
623 | 603 | | |
624 | | - | |
| 604 | + | |
625 | 605 | | |
626 | 606 | | |
627 | 607 | | |
| |||
638 | 618 | | |
639 | 619 | | |
640 | 620 | | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
641 | 625 | | |
642 | 626 | | |
643 | 627 | | |
| |||
0 commit comments