Commit 35e156b
pack-bitmap: simplify
The signature of `reuse_partial_packfile_from_bitmap()` currently takes
in a bitmap, as well as three output parameters (filled through
pointers, and passed as arguments), and also returns an integer result.
The output parameters are filled out with: (a) the packfile used for
pack-reuse, (b) the number of objects from that pack that we can reuse,
and (c) a bitmap indicating which objects we can reuse. The return value
is either -1 (when there are no objects to reuse), or 0 (when there is
at least one object to reuse).
Some of these parameters are redundant. Notably, we can infer from the
bitmap how many objects are reused by calling bitmap_popcount(). And we
can similar compute the return value based on that number as well.
As such, clean up the signature of this function to drop the "*entries"
parameter, as well as the int return value, since the single caller of
this function can infer these values themself.
Signed-off-by: Taylor Blau <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>reuse_partial_packfile_from_bitmap() signature1 parent e5d48bf commit 35e156b
3 files changed
+19
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3943 | 3943 | | |
3944 | 3944 | | |
3945 | 3945 | | |
3946 | | - | |
3947 | | - | |
3948 | | - | |
3949 | | - | |
3950 | | - | |
3951 | | - | |
3952 | | - | |
| 3946 | + | |
| 3947 | + | |
| 3948 | + | |
| 3949 | + | |
| 3950 | + | |
| 3951 | + | |
| 3952 | + | |
| 3953 | + | |
| 3954 | + | |
3953 | 3955 | | |
3954 | 3956 | | |
3955 | 3957 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2000 | 2000 | | |
2001 | 2001 | | |
2002 | 2002 | | |
2003 | | - | |
2004 | | - | |
2005 | | - | |
2006 | | - | |
| 2003 | + | |
| 2004 | + | |
| 2005 | + | |
2007 | 2006 | | |
2008 | 2007 | | |
2009 | 2008 | | |
| |||
2025 | 2024 | | |
2026 | 2025 | | |
2027 | 2026 | | |
2028 | | - | |
| 2027 | + | |
2029 | 2028 | | |
2030 | 2029 | | |
2031 | 2030 | | |
| |||
2059 | 2058 | | |
2060 | 2059 | | |
2061 | 2060 | | |
2062 | | - | |
2063 | | - | |
| 2061 | + | |
| 2062 | + | |
2064 | 2063 | | |
2065 | | - | |
| 2064 | + | |
2066 | 2065 | | |
2067 | 2066 | | |
2068 | 2067 | | |
| |||
2072 | 2071 | | |
2073 | 2072 | | |
2074 | 2073 | | |
2075 | | - | |
2076 | 2074 | | |
2077 | 2075 | | |
2078 | 2076 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
85 | 84 | | |
86 | 85 | | |
87 | 86 | | |
| |||
0 commit comments