Martin Koegler <mkoegler@xxxxxxxxxxxxxxxxx> writes: > The cause of a NULL in tag->tagged can be: > * a unknown object type is used > * the tag points to a object with an other type as stated > in the tag. > > Both situations are most likley be caused by a not welformed > tag. Catching this error here avoids doing tag->tagged!=NULL > checks in the rest of git. Honestly, I am torn on this. The approach certainly is attractive if you care only about working in a perfectly well connected repository of a known vintage. On the other hand, however, this robs from callers the clue that the tag itself was Ok but it points at something we do not know about. Maybe the caller was only interested in the tag itself but did not care about the pointee, and erroring out like this may make it impossible for the caller to act on the tag itself. Maybe the caller even knew about the breakage of the repository and wanted to salvage as much as possible, but because this errors out, it would now consider this tag object itself is bad and give up, salvaging one less object. It looks to me that this, along with other "tighten parse_X_buffer()" changes you sent earlier, closes door to them. That's why I think that parse_X_buffer() should be more lenient than fsck and keep saying it. - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html