Commit 17cabd3
fetch-pack: move fsck options into function scope
When fetching a packfile, we optionally verify received objects via the
fsck subsystem. The options for those consistency checks are declared in
global scope without a good reason, and they are never cleaned up. So in
case the options are reused, they may accumulate more state over time.
Furthermore, in subsequent changes we'll introduce a repository pointer
into the structure. Obviously though, we don't have a repository
available at static time, except for `the_repository`, which we don't
want to use here.
Refactor the code to move the options into the respective functions and
properly manage their lifecycle.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent ca1db8a commit 17cabd3
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | 54 | | |
56 | 55 | | |
57 | 56 | | |
| |||
1100 | 1099 | | |
1101 | 1100 | | |
1102 | 1101 | | |
| 1102 | + | |
1103 | 1103 | | |
1104 | 1104 | | |
1105 | 1105 | | |
| |||
1235 | 1235 | | |
1236 | 1236 | | |
1237 | 1237 | | |
| 1238 | + | |
1238 | 1239 | | |
1239 | 1240 | | |
1240 | 1241 | | |
| |||
1654 | 1655 | | |
1655 | 1656 | | |
1656 | 1657 | | |
| 1658 | + | |
1657 | 1659 | | |
1658 | 1660 | | |
1659 | 1661 | | |
| |||
1882 | 1884 | | |
1883 | 1885 | | |
1884 | 1886 | | |
| 1887 | + | |
1885 | 1888 | | |
1886 | 1889 | | |
1887 | 1890 | | |
| |||
0 commit comments