Commit c01f51c
find_pack_entry(): do not keep packed_git pointer locally
Commit f7c22cc (always start looking up objects in the last used pack
first - 2007-05-30) introduce a static packed_git* pointer as an
optimization. The kept pointer however may become invalid if
free_pack_by_name() happens to free that particular pack.
Current code base does not access packs after calling
free_pack_by_name() so it should not be a problem. Anyway, move the
pointer out so that free_pack_by_name() can reset it to avoid running
into troubles in future.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Acked-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 9509973 commit c01f51c
1 file changed
+13
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
| |||
720 | 722 | | |
721 | 723 | | |
722 | 724 | | |
| 725 | + | |
| 726 | + | |
723 | 727 | | |
724 | 728 | | |
725 | 729 | | |
| |||
2046 | 2050 | | |
2047 | 2051 | | |
2048 | 2052 | | |
2049 | | - | |
2050 | 2053 | | |
2051 | 2054 | | |
2052 | 2055 | | |
2053 | 2056 | | |
2054 | 2057 | | |
2055 | | - | |
2056 | 2058 | | |
2057 | | - | |
2058 | | - | |
2059 | | - | |
2060 | | - | |
2061 | | - | |
| 2059 | + | |
| 2060 | + | |
2062 | 2061 | | |
2063 | | - | |
2064 | | - | |
2065 | | - | |
2066 | | - | |
2067 | | - | |
2068 | | - | |
2069 | | - | |
| 2062 | + | |
| 2063 | + | |
| 2064 | + | |
| 2065 | + | |
| 2066 | + | |
| 2067 | + | |
| 2068 | + | |
2070 | 2069 | | |
2071 | 2070 | | |
2072 | 2071 | | |
| |||
0 commit comments