git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 5/6] git-sh-setup: remove unused sane_egrep() function

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 22, 2021, 00:27 UTC
Message-ID
<xmqq8rylgaz4.fsf@gitster.g>
In-Reply-To
<patch-5.6-eacbfd6be0e-20211021T195538Z-avarab@gmail.com>
Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:
Show 12 quoted lines
> The is_zero_oid() function in git-submodule.sh has not been used since
> e83e3333b57 (submodule: port submodule subcommand 'summary' from shell
> to C, 2020-08-13), so we can remove it, and the sane_egrep() function,
> dead is_zero_oid() was the only function which still referenced it.
>
> Unlike some other functions in git-sh-setup.sh, this function has not
> been documented in git-sh-setup(1), so per [1] it should be OK to
> remove it. I'm still unclear about the future of some of the other
> functions[2], but any questions in that area should not apply here.
>
> 1. https://lore.kernel.org/git/xmqqr1dtgnn8.fsf@gitster.g/
> 1. https://lore.kernel.org/git/87tuiwjfvi.fsf@evledraar.gmail.com/

Don't force readers to go outside of "git log" stream they are reading. Instead, summarize the argument that you base your decision on for readers of your proposed commit log message.

Show 21 quoted lines
>
> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
> ---
>  git-sh-setup.sh | 4 ----
>  1 file changed, 4 deletions(-)
>
> diff --git a/git-sh-setup.sh b/git-sh-setup.sh
> index cee053cdc38..758520f5a61 100644
> --- a/git-sh-setup.sh
> +++ b/git-sh-setup.sh
> @@ -177,10 +177,6 @@ sane_grep () {
>  	GREP_OPTIONS= LC_ALL=C grep @@SANE_TEXT_GREP@@ "$@"
>  }
>  
> -sane_egrep () {
> -	GREP_OPTIONS= LC_ALL=C egrep @@SANE_TEXT_GREP@@ "$@"
> -}
> -
>  is_bare_repository () {
>  	git rev-parse --is-bare-repository
>  }
Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 8 of 15 in “Makefile: be less eager to re-build, *.sh code cleanups”
  1. 0/6 Makefile: be less eager to re-build, *.sh code cleanupsÆvar Arnfjörð Bjarmason, Oct 21, 2021
  2. 1/6 Makefile: move git-SCRIPT-DEFINES adjacent to $(SCRIPT_DEFINES)Ævar Arnfjörð Bjarmason, Oct 21, 2021
  3. 2/6 Makefile: remove $(GIT_VERSION) from $(SCRIPT_DEFINES)Ævar Arnfjörð Bjarmason, Oct 21, 2021
  4. Jeff KingOct 25, 2021
  5. 3/6 Makefile: remove $(NO_CURL) from $(SCRIPT_DEFINES)Ævar Arnfjörð Bjarmason, Oct 21, 2021
  6. 4/6 git-instaweb: unconditionally assume that gitweb is mod_perl capableÆvar Arnfjörð Bjarmason, Oct 21, 2021
  7. 5/6 git-sh-setup: remove unused sane_egrep() functionÆvar Arnfjörð Bjarmason, Oct 21, 2021
  8. Junio C HamanoOct 22, 2021
  9. 6/6 git-sh-setup: remove "sane_grep", it's not needed anymoreÆvar Arnfjörð Bjarmason, Oct 21, 2021
  10. Junio C HamanoOct 21, 2021
  11. Johannes SchindelinOct 22, 2021
  12. Junio C HamanoOct 24, 2021
  13. Johannes SchindelinOct 25, 2021
  14. Junio C HamanoOct 25, 2021
  15. Jeff KingOct 25, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.