Commit 629b1ba
committed
clone: make filter_options local to cmd_clone()
The `struct list_objects_filter_options filter_options` variable used
in "builtin/clone.c" to store the parsed filters specified by
`--filter=<filterspec>` is currently a static variable global to the
file.
As we are going to use it more in a following commit, it could become
a bit less easy to understand how it's managed.
To avoid that, let's make it clear that it's owned by cmd_clone() by
moving its definition into that function and making it non-static.
The only additional change to make this work is to pass it as an
argument to checkout(). So it's a small quite cheap cleanup anyway.
Signed-off-by: Christian Couder <[email protected]>1 parent 9bcfa03 commit 629b1ba
1 file changed
+11
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
81 | 80 | | |
82 | 81 | | |
83 | 82 | | |
| |||
634 | 633 | | |
635 | 634 | | |
636 | 635 | | |
637 | | - | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
638 | 639 | | |
639 | 640 | | |
640 | 641 | | |
| |||
723 | 724 | | |
724 | 725 | | |
725 | 726 | | |
726 | | - | |
| 727 | + | |
727 | 728 | | |
728 | | - | |
| 729 | + | |
729 | 730 | | |
730 | 731 | | |
731 | 732 | | |
| |||
903 | 904 | | |
904 | 905 | | |
905 | 906 | | |
| 907 | + | |
906 | 908 | | |
907 | 909 | | |
908 | 910 | | |
| |||
1625 | 1627 | | |
1626 | 1628 | | |
1627 | 1629 | | |
1628 | | - | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
1629 | 1633 | | |
1630 | 1634 | | |
| 1635 | + | |
| 1636 | + | |
1631 | 1637 | | |
1632 | 1638 | | |
1633 | 1639 | | |
| |||
0 commit comments