]> git.ipfire.org Git - thirdparty/git.git/commit - git-mergetool.sh
mergetool: move main program flow into a main() function
authorDavid Aguilar <davvid@gmail.com>
Fri, 7 Oct 2016 23:58:04 +0000 (16:58 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 11 Oct 2016 17:04:23 +0000 (10:04 -0700)
commit08221e3fa27396aca30cb539f006f78636782951
tree71f5d7b2f8834931b70b19ba74355572445ae9f0
parent8827b3a8873ebfad79b324d6134c1ec4bbea5f06
mergetool: move main program flow into a main() function

Make it easier to follow the program's flow by isolating all
logic into functions.  Isolate the main execution code path into
a single unit instead of having prompt_after_failed_merge()
interrupt it partyway through.

The use of a main() function is borrowing a convention from C,
Python, Perl, and many other languages.  This helps readers more
familiar with other languages understand the purpose of each
function when diving into the codebase with fresh eyes.

Signed-off-by: David Aguilar <davvid@gmail.com>
Reviewed-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-mergetool.sh