pretty: use strchr(3) in userformat_find_requirements()
commitbd19ee9c459b2d7872a8e486fd9c2f1b17d662a5
authorRené Scharfe <l.s.r@web.de>
Fri, 7 Jul 2023 19:08:33 +0000 (7 21:08 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 7 Jul 2023 22:32:57 +0000 (7 15:32 -0700)
treee665ab970390a9df0dbfb219e434e5ba079f7a12
parent4416b86c6b34dad64b556bb1eb6711d5e6595a48
pretty: use strchr(3) in userformat_find_requirements()

The strbuf_expand_step() loop in userformat_find_requirements() iterates
through the percent signs in the string "fmt", but we're not interested
in its effect on the strbuf "dummy".  Use strchr(3) instead and get rid
of the strbuf that we no longer need.

Suggested-by: Jeff King <peff@peff.net>
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
pretty.c