]> git.ipfire.org Git - thirdparty/git.git/commit
version: replace manual ASCII checks with isprint() for clarity
authorUsman Akinyemi <usmanakinyemi202@gmail.com>
Sat, 15 Feb 2025 15:50:47 +0000 (21:20 +0530)
committerJunio C Hamano <gitster@pobox.com>
Tue, 18 Feb 2025 17:05:12 +0000 (09:05 -0800)
commit0c124cba5435c59591da7c91e16bbd901a518bd4
tree207b7af6810c4fdca0af5c38a5158150b155037f
parente63e62171b489dad8ae9d8bd4675b1938bff92c8
version: replace manual ASCII checks with isprint() for clarity

Since the isprint() function checks for printable characters, let's
replace the existing hardcoded ASCII checks with it. However, since
the original checks also handled spaces, we need to account for spaces
explicitly in the new check.

Mentored-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
version.c