]> git.ipfire.org Git - thirdparty/git.git/commit - t/t3203-branch-output.sh
ref-filter: add %(rest) atom
authorZheNing Hu <adlternative@gmail.com>
Mon, 26 Jul 2021 03:26:50 +0000 (03:26 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 26 Jul 2021 19:01:26 +0000 (12:01 -0700)
commitb9dee075eb07713a49922f7e1f90a6a9de5c5e5f
tree989e44066bf80856880edf37ea3dbcca3a65e2f1
parente85fcb355a38b5f01493efecdf0150a10ee471da
ref-filter: add %(rest) atom

%(rest) is a atom used for cat-file batch mode, which can split
the input lines at the first whitespace boundary, all characters
before that whitespace are considered to be the object name;
characters after that first run of whitespace (i.e., the "rest"
of the line) are output in place of the %(rest) atom.

In order to let "cat-file --batch=%(rest)" use the ref-filter
interface, add %(rest) atom for ref-filter.

Introduce the reject_atom() to reject the atom %(rest) for
"git for-each-ref", "git branch", "git tag" and "git verify-tag".

Reviewed-by: Jacob Keller <jacob.keller@gmail.com>
Suggected-by: Jacob Keller <jacob.keller@gmail.com>
Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored-by: Hariom Verma <hariom18599@gmail.com>
Signed-off-by: ZheNing Hu <adlternative@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
ref-filter.c
ref-filter.h
t/t3203-branch-output.sh
t/t6300-for-each-ref.sh
t/t7004-tag.sh
t/t7030-verify-tag.sh