Re: [PATCH 0/9] remove dead shell code
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 2, 2021, 22:42 UTC
- Message-ID
- <xmqq7dfyioq4.fsf@gitster.g>
- In-Reply-To
- <CAPUEspj9YPJHcKzjGNR05-FnkzRoZJ0yKC1McA5wM06HgUPVHw@mail.gmail.com>
Carlo Arenas <carenas@gmail.com> writes:
> Dropping it now would avoid having to change it to `grep -E` as egrep > gets obsoleted.
Keeping it would isolate the callers from "grep -E" vs "egrep" because they do not need to know. They can keep calling sane_egrep().
Having said that, I do not think anybody minds losing sane_egrep(). Many helper functions in the shell library are about encapsulating the knowledge we have on and around Git and making it easier for third-party script writers to use the knowledge. The functions like is_bare_repository(), cd_to_toplevel(), and git_pager() all fall into that category. sane_egrep is not that kind of a helper (it encapusulates our knowledge about GNU grep's quirk we found when we tried to use it in our scripts---third-party script writers do not need help from Git experts on their use of egrep).
Thanks.