]> git.ipfire.org Git - thirdparty/git.git/commit - fsck.c
fsck.c: call parse_msg_type() early in fsck_set_msg_type()
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Sun, 28 Mar 2021 13:15:42 +0000 (15:15 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 29 Mar 2021 02:03:10 +0000 (19:03 -0700)
commitc72da1a22bb3996ab8740b91ad2af6a54bd22777
treed7c99c9267b6d0afbdd4726994fa5a4f038171ec
parent30cf618eef09573a2f411e0b420e19f2f2e5a1c1
fsck.c: call parse_msg_type() early in fsck_set_msg_type()

There's no reason to defer the calling of parse_msg_type() until after
we've checked if the "id < 0". This is not a hot codepath, and
parse_msg_type() itself may die on invalid input.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
fsck.c