]> git.ipfire.org Git - thirdparty/git.git/commit - builtin/branch.c
branch: roll show_detached HEAD into regular ref_list
authorKarthik Nayak <karthik.188@gmail.com>
Wed, 23 Sep 2015 18:11:08 +0000 (23:41 +0530)
committerJunio C Hamano <gitster@pobox.com>
Wed, 23 Sep 2015 18:41:25 +0000 (11:41 -0700)
commit23e714df91cb8d824f6fd0594cd80c8a7dd9b751
treebee0535ec2c6615b5aabf689b087841a8fca0d20
parent2dad24a5c39bb26a815c35c5db7a35499bad48e1
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 <peff@peff.net>
Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/branch.c