Commit 1427a7f
committed
write_sha1_file(): do not use a separate sha1[] array
In the beginning, write_sha1_file() did not have a way to tell the
caller the name of the object it wrote to the caller. This was
changed in d6d3f9d (This implements the new "recursive tree"
write-tree., 2005-04-09) by adding the "returnsha1" parameter to the
function so that the callers who are interested in the value can
optionally pass a pointer to receive it.
It turns out that all callers do want to know the name of the object
it just has written. Nobody passes a NULL to this parameter, hence
it is not necessary to use a separate sha1[] array to receive the
result from write_sha1_file_prepare(), and copy the result to the
returnsha1 supplied by the caller.
Signed-off-by: Junio C Hamano <[email protected]>1 parent 383c342 commit 1427a7f
1 file changed
+1
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2945 | 2945 | | |
2946 | 2946 | | |
2947 | 2947 | | |
2948 | | - | |
| 2948 | + | |
2949 | 2949 | | |
2950 | | - | |
2951 | 2950 | | |
2952 | 2951 | | |
2953 | 2952 | | |
2954 | 2953 | | |
2955 | 2954 | | |
2956 | 2955 | | |
2957 | 2956 | | |
2958 | | - | |
2959 | | - | |
2960 | 2957 | | |
2961 | 2958 | | |
2962 | 2959 | | |
| |||
0 commit comments