I don't understand what the problem is with the behavior that was
deliberately added in commit 08a45903cb32 ("object-file-convert: convert
commits that embed signed tags").
Fundamentally if a header holds a object id the code needs to know about
the header or the commit can not be converted. Ignoring that
possibility will result in inconsistent and improper conversions that
affect the structure of the git tree.
When git isn't converting commits it doesn't matter so I also don't
see a problem with the two code paths being different, as the difference
is in their fundamental responsibilities.
My sense is that deliberately failing is better than generating a
garbage commit. I think that should definitely be the default.
Fundamentally the code must be updated whenever someone adds a new
header that adds additional object ids.
For me the question is how does the code reasonably detect new headers
with object ids and fail those while allowing the other non-problematic
cases to work.
The paths I see are whitelisting all headers. Or having something that
scans the unknown like and causes the conversion to fail if it includes
anything that looks like an object id.
It might make sense to add a warning in the ordinary commit case about
headers that we don't know how to commit.
How do we prevent creating a corrupt git archive? If there are such
headers the converted archive will be corrupt when the non-converted
archive is fine.
Eric
Re: [PATCH v3 4/4] object-file-convert: copy unknown commit headers unchanged
- From
- ebie…@xmission.com ("Eric W. Biederman")
- Organization
- Usenet Network
- Message-ID
- <8733…@email.froward.int.ebiederm.org>
- Date
- Newsgroups
- linux.kernel.git