builtin: move builtin retrieval to get_builtin()
commitc4f901d1593f3ef097c3e73daa2847ed9ad9efe0
authorSlavomir Vlcek <svlc@inventati.org>
Wed, 12 Nov 2014 13:10:22 +0000 (12 14:10 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 13 Nov 2014 18:40:41 +0000 (13 10:40 -0800)
tree11c5b4fe233ad7c6e8e58c638bc7bb7262390b19
parent7fa1365c54c28b3cd9375539f381b54061a1880d
builtin: move builtin retrieval to get_builtin()

There was a redundant code for a builtin command retrieval in
'handle_builtin()' and 'is_builtin()'.

Introduce a new function 'get_builtin()' and using it from
both of these places to reduce the redundancy.

Signed-off-by: Slavomir Vlcek <svlc@inventati.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git.c