ref-filter: add an 'rstrip=<N>' option to atoms which deal with refnames
authorKarthik Nayak <karthik.188@gmail.com>
Tue, 10 Jan 2017 08:49:49 +0000 (14:19 +0530)
committerJunio C Hamano <gitster@pobox.com>
Tue, 31 Jan 2017 20:42:33 +0000 (12:42 -0800)
commit1a34728e6bb469083dd46ff35362fdfc6e489d07
treec1c9b67be8b03ed190297a8dc54b70d34ffe71e2
parent1a0ca5e358c1af14160e610e346c706e5dccf535
ref-filter: add an 'rstrip=<N>' option to atoms which deal with refnames

Complimenting the existing 'lstrip=<N>' option, add an 'rstrip=<N>'
option which strips `<N>` slash-separated path components from the end
of the refname (e.g., `%(refname:rstrip=2)` turns `refs/tags/foo` into
`refs`).

Signed-off-by: Karthik Nayak <Karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-for-each-ref.txt
ref-filter.c
t/t6300-for-each-ref.sh