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

Re: [PATCH] t1002: stop using sum(1)

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 14, 2017, 20:35 UTC
Message-ID
<xmqqtw19ubtz.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<9f6e13d3-07ff-1eaa-9453-05ca26a3c1ff@web.de>
René Scharfe <l.s.r@web.de> writes:
> It's more convenient because it shows differences nicely, it's faster on
> MinGW because we have a special implementation there based only on
> shell-internal commands,...

This made me wonder why we are not using that "faster" one everywhere, but it turns out that it depends on bash-ism "local", which is perfectly fine when limited to MinGW but not safe to assume in general.

Show 11 quoted lines
> ...
> With all sum(1) calls gone, remove the MinGW-specific implementation
> from test-lib.sh as well.
>
> [1] http://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man1/sum.1
> [2] http://minnie.tuhs.org/cgi-bin/utree.pl?file=4.4BSD/usr/share/man/cat1/cksum.0
> [3] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/cksum.html
> ---
>  t/t1002-read-tree-m-u-2way.sh | 67 ++++++++++++++++++++++---------------------
>  t/test-lib.sh                 |  3 --
>  2 files changed, 35 insertions(+), 35 deletions(-)

Sounds like a sensible approach to clean things up; I didn't check with fine toothed comb if the patch does follow that approach correctly without breaking things, though.

Previous: René ScharfeNext: Jonathan Nieder
Message 2 of 6 in “t1002: stop using sum(1)”
  1. t1002: stop using sum(1)René Scharfe, Aug 14, 2017
  2. Junio C HamanoAug 14, 2017
  3. Jonathan NiederAug 15, 2017
  4. Johannes SixtAug 15, 2017
  5. René ScharfeAug 15, 2017
  6. René ScharfeAug 15, 2017

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.