summaryrefslogtreecommitdiff
path: root/builtin/checkout-index.c
diff options
context:
space:
mode:
authorLibravatar Karthik Nayak <karthik.188@gmail.com>2015-06-14 01:07:19 +0530
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-06-15 11:48:07 -0700
commited01e206ba53a52d0094abcd9f99237b4e2847c9 (patch)
treec63a8e2a2be4106d06bdb90fffd91ce5e9c9d007 /builtin/checkout-index.c
parentSecond half of seventh batch (diff)
downloadtgif-ed01e206ba53a52d0094abcd9f99237b4e2847c9.tar.xz
for-each-ref: extract helper functions out of grab_single_ref()
Extract two helper functions out of grab_single_ref(). Firstly, new_refinfo() which is used to allocate memory for a new refinfo structure and copy the objectname, refname and flag to it. Secondly, match_name_as_path() which when given an array of patterns and the refname checks if the refname matches any of the patterns given while the pattern is a pathname, also supports wildcard characters. This is a preperatory patch for restructuring 'for-each-ref' and eventually moving most of it to 'ref-filter' to provide the functionality to similar commands via public API's. Helped-by: Junio C Hamano <gitster@pobox.com> 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> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/checkout-index.c')
0 files changed, 0 insertions, 0 deletions