git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "SZEDER Gábor" <szeder.dev@gmail.com>
Cc: git@vger.kernel.org, "brian m. carlson" <sandals@crustytoothpaste.net>
Subject: Re: [PATCH] tests: make 'test_oid' print trailing newline
Date: Mon, 19 Dec 2022 09:48:49 +0900	[thread overview]
Message-ID: <xmqqy1r4usjy.fsf@gitster.g> (raw)
In-Reply-To: <20221218162905.3508164-1-szeder.dev@gmail.com> ("SZEDER Gábor"'s message of "Sun, 18 Dec 2022 17:29:05 +0100")

SZEDER Gábor <szeder.dev@gmail.com> writes:

> Unlike other test helper functions, 'test_oid' doesn't terminate its
> output with a LF, but, alas, the reason for this, if any, is not
> mentioned in 2c02b110da (t: add test functions to translate
> hash-related values, 2018-09-13)).

I (obviously) agree with the analysis in the proposed log message.
Having to touch the sanity checking tests in 0-basic is a bit
annoying, but having to do an artificial echo is even more annoying,
so these changes may probably be a net win, I would say.

Having said that.

>       $ git grep '\stest_oid ' -- ':/t/*.sh'
>       $ git grep 'echo "\?$(test_oid ' -- ':/t/*.sh'

I found these examples in the log message a bit annoying to see, as
both invite an undefined behaviour by having an ordinary character
('s' or '?')  preceded by an unescaped backslash in a POSIXly
correct implementation of BRE.  GNU libc seems to be OK with it (I
double checked by adding "-G" on the command line to make sure my
experiments are not affected by any grep.patterntype), but they may
fail for folks on stricter platforms.

Thanks.  Will queue.

  reply	other threads:[~2022-12-19  0:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-18 16:29 [PATCH] tests: make 'test_oid' print trailing newline SZEDER Gábor
2022-12-19  0:48 ` Junio C Hamano [this message]
2022-12-22 18:58   ` SZEDER Gábor
2022-12-23  0:56     ` Junio C Hamano
2022-12-19 14:03 ` brian m. carlson
2022-12-19 15:27 ` Ævar Arnfjörð Bjarmason
2022-12-19 23:58   ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqy1r4usjy.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=sandals@crustytoothpaste.net \
    --cc=szeder.dev@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).