You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
packed-backend: create "fsck_packed_ref_entry" to store parsing info
We have already check whether the oid hash is correct by using
`parse_oid_hex_algop`. However, we doesn't check whether the object
exists. It may seem that we could do this when we are parsing the raw
"packed-refs" file. But this is impossible. Let's analysis why.
We will use "parse_object" function to get the "struct object". However,
this function will eventually call the "create_snapshot" and
"next_record" function in "packed-backend.c". If there is anything
wrong, it will die the program. And we don't want to die the program
during the check.
So, we should store the information in the parsing process. And if there
is nothing wrong in the parsing process, we could continue to check
things. So, create "fsck_packed_ref_entry" to do this.
Mentored-by: Patrick Steinhardt <[email protected]>
Mentored-by: Karthik Nayak <[email protected]>
Signed-off-by: shejialuo <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
0 commit comments