]> git.ipfire.org Git - thirdparty/git.git/commit - git.c
git.c: improve code readability in cmd_main()
authorDaniel Sonbolian <dsal3389@gmail.com>
Sat, 8 Oct 2022 16:21:37 +0000 (16:21 +0000)
committerJunio C Hamano <gitster@pobox.com>
Sun, 9 Oct 2022 05:11:37 +0000 (22:11 -0700)
commit413bc6d20ad4d686f68afcf3c012b77840c1243b
treea7b5a1403b7b120a958e77978d7f398f71b305f4
parenta0feb8611d4c0b2b5d954efe4e98207f62223436
git.c: improve code readability in cmd_main()

Check for an error condition whose body unconditionally exists
first, and then perform the special casing of "version" and "help"
as part of the preparation for the "normal codepath".  This makes
the code simpler to read.

Signed-off-by: Daniel Sonbolian <dsal3389@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git.c