Commit 412916e
packed_object_info: make type lookup optional
Currently, packed_object_info can save some work by not
calculating the size or disk_size of the object if the
caller is not interested. However, it always calculates the
true object type, whether the caller cares or not, and only
optionally returns the easy-to-get "representation type".
Let's swap these types. The function will now return the
representation type (or OBJ_BAD on failure), and will only
optionally fill in the true type.
There should be no behavior change yet, as the only caller,
sha1_object_info_extended, will always feed it a type
pointer.
Signed-off-by: Jeff King <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>1 parent 90191d3 commit 412916e
1 file changed
+16
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1780 | 1780 | | |
1781 | 1781 | | |
1782 | 1782 | | |
1783 | | - | |
| 1783 | + | |
1784 | 1784 | | |
1785 | 1785 | | |
1786 | 1786 | | |
1787 | 1787 | | |
1788 | 1788 | | |
1789 | 1789 | | |
1790 | 1790 | | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
1791 | 1795 | | |
1792 | 1796 | | |
1793 | | - | |
1794 | | - | |
1795 | | - | |
1796 | 1797 | | |
1797 | 1798 | | |
1798 | 1799 | | |
| |||
1817 | 1818 | | |
1818 | 1819 | | |
1819 | 1820 | | |
1820 | | - | |
| 1821 | + | |
| 1822 | + | |
| 1823 | + | |
| 1824 | + | |
| 1825 | + | |
| 1826 | + | |
| 1827 | + | |
1821 | 1828 | | |
1822 | 1829 | | |
1823 | 1830 | | |
| |||
2452 | 2459 | | |
2453 | 2460 | | |
2454 | 2461 | | |
2455 | | - | |
2456 | | - | |
2457 | | - | |
| 2462 | + | |
| 2463 | + | |
| 2464 | + | |
2458 | 2465 | | |
2459 | | - | |
| 2466 | + | |
2460 | 2467 | | |
2461 | 2468 | | |
2462 | 2469 | | |
| |||
0 commit comments