clarify some error messages wrt unknown object types
If ever new object types are added for future extensions then better have current git version report them as "unknown" instead of "corrupted". Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:

committed by
Junio C Hamano

parent
85023577a8
commit
08a19d873c
@ -1013,7 +1013,7 @@ void packed_object_info_detail(struct packed_git *p,
|
||||
for (;;) {
|
||||
switch (kind) {
|
||||
default:
|
||||
die("corrupted pack file %s containing object of kind %d",
|
||||
die("pack %s contains unknown object type %d",
|
||||
p->pack_name, kind);
|
||||
case OBJ_COMMIT:
|
||||
case OBJ_TREE:
|
||||
@ -1063,7 +1063,7 @@ static int packed_object_info(struct packed_git *p, unsigned long offset,
|
||||
strcpy(type, type_names[kind]);
|
||||
break;
|
||||
default:
|
||||
die("corrupted pack file %s containing object of kind %d",
|
||||
die("pack %s contains unknown object type %d",
|
||||
p->pack_name, kind);
|
||||
}
|
||||
if (sizep)
|
||||
|
Reference in New Issue
Block a user