Re: [PATCH v3] builtin-fsck: reports missing parent commits
- From
- Martin Koegler <mkoegler@auto.tuwien.ac.at>
- Date
- Feb 25, 2008, 07:16 UTC
- Message-ID
- <20080225071642.GA15761@auto.tuwien.ac.at>
- In-Reply-To
- <7vlk59pwaj.fsf@gitster.siamese.dyndns.org>
On Sun, Feb 24, 2008 at 07:08:52PM -0800, Junio C Hamano wrote:
Show 18 quoted lines
> Martin Koegler <mkoegler@auto.tuwien.ac.at> writes: > As far as I can tell, the new test is not testing the commit > object we are looking at from the object database. What it is > testing is if the code that parsed and prepared the information > in "struct commit" found the same number of parents an extra > check we are doing here by hand (if not grafted --- but > presumably whoever gave the struct commit we are handling here > would have obtained that information by doing the same parsing), > or the parsing of the graft file (when grafted --- but > presumably whoever gave the struct commit we are handling here > would have obtained that information by calling the same > llokup_commit_graft()). > > So I am not sure what problems in the repository objects these > new checks are designed to catch. > > This needs a lot of explanation than what's in your commit log > message.
If we have already parsed a non-commit object and parse_commit_buffer hits such a sha1 in a parent line, it simply drops it (same for grafts).
I hope that you agree with me, that fsck should catch such an error.
As you don't want to tighten parse_commit_buffer, it must be in fsck.
mfg Martin Kögler