branch: roll show_detached HEAD into regular ref_list
branch: roll show_detached HEAD into regular ref_list

Remove show_detached() and make detached HEAD to be rolled into
regular ref_list by adding REF_DETACHED_HEAD as a kind of branch and
supporting the same in append_ref(). This eliminates the need for an
extra function and helps in easier porting of branch.c to use
ref-filter APIs.

Before show_detached() used to check if the HEAD branch satisfies the
'--contains' option, now that is taken care by append_ref().

Based-on-patch-by: Jeff King <696e3fbcf235d40b6ea1ebd61c87cbea79d444e7@peff.net>
Mentored-by: Christian Couder <58cc993db606fd7043084d51c23db751557f1001@gmail.com>
Mentored-by: Matthieu Moy <fbbe566372a364dbd17bce4222f8e1855291903f@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <f21e23168db91f2bd3ec812184a2ac51d05a196a@gmail.com>
Signed-off-by: Junio C Hamano <a6723cc3f76163bf7adb636a73ac3b0ceb3e6b9b@pobox.com>

destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git