]> Kevux Git Server - rit/commit
mv: decouple if/else-if checks using goto
authorShaoxuan Yuan <shaoxuan.yuan02@gmail.com>
Thu, 30 Jun 2022 02:37:33 +0000 (10:37 +0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 1 Jul 2022 21:50:16 +0000 (14:50 -0700)
commit7889755bae89fd792924e95d713a94578b902d11
tree6b3e913c861229ea182bbe81fd2f9a0e6dd1018e
parent707fa2f76ac77f441578943be56e5a4a3ee8c3c5
mv: decouple if/else-if checks using goto

Previous if/else-if chain are highly nested and hard to develop/extend.

Refactor to decouple this if/else-if chain by using goto to jump ahead.

Suggested-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Shaoxuan Yuan <shaoxuan.yuan02@gmail.com>
Acked-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/mv.c