Commit 462f5ca
fetch-pack: don't needlessly copy fsck_options
Change the behavior of the .gitmodules validation added in
5476e1e (fetch-pack: print and use dangling .gitmodules,
2021-02-22) so we're using one "fsck_options".
I found that code confusing to read. One might think that not setting
up the error_func earlier means that we're relying on the "error_func"
not being set in some code in between the two hunks being modified
here.
But we're not, all we're doing in the rest of "cmd_index_pack()" is
further setup by calling fsck_set_msg_types(), and assigning to
do_fsck_object.
So there was no reason in 5476e1e to make a shallow copy of the
fsck_options struct before setting error_func. Let's just do this
setup at the top of the function, along with the "walk" assignment.
Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>1 parent c15087d commit 462f5ca
1 file changed
+3
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1761 | 1761 | | |
1762 | 1762 | | |
1763 | 1763 | | |
| 1764 | + | |
1764 | 1765 | | |
1765 | 1766 | | |
1766 | 1767 | | |
| |||
1951 | 1952 | | |
1952 | 1953 | | |
1953 | 1954 | | |
1954 | | - | |
1955 | | - | |
1956 | | - | |
1957 | | - | |
1958 | | - | |
1959 | | - | |
1960 | | - | |
| 1955 | + | |
| 1956 | + | |
1961 | 1957 | | |
1962 | 1958 | | |
1963 | 1959 | | |
| |||
0 commit comments