1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-30 03:16:31 +02:00

Merge branch 'ds/upload-pack-error-sequence-fix'

Error message generation fix.

* ds/upload-pack-error-sequence-fix:
  upload-pack: fix exit code when denying fetch of unreachable object ID
  upload-pack: fix race condition in error messages
This commit is contained in:
Junio C Hamano 2023-08-24 09:32:33 -07:00
commit 84d79009d9

View File

@ -801,11 +801,12 @@ static void check_non_tip(struct upload_pack_data *data)
for (i = 0; i < data->want_obj.nr; i++) {
struct object *o = data->want_obj.objects[i].item;
if (!is_our_ref(o, data->allow_uor)) {
error("git upload-pack: not our ref %s",
oid_to_hex(&o->oid));
packet_writer_error(&data->writer,
"upload-pack: not our ref %s",
oid_to_hex(&o->oid));
die("git upload-pack: not our ref %s",
oid_to_hex(&o->oid));
exit(128);
}
}
}