Git Mailing List Archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Cc: git@vger.kernel.org, Phillip Wood <phillip.wood123@gmail.com>
Subject: Re: [PATCH v5] send-email: prompt-dependent exit codes
Date: Tue, 29 Aug 2023 17:46:32 -0700	[thread overview]
Message-ID: <xmqq3501bbmf.fsf@gitster.g> (raw)
In-Reply-To: 20230821170720.577835-1-oswald.buddenhagen@gmx.de

Oswald Buddenhagen <oswald.buddenhagen@gmx.de> writes:

> Proposed content for RelNotes:
>
>  * "git send-email" now reports interactive cancellation via a distinct
>    non-zero exit status. Callers which do not consider this situation an
>    error need to be adjusted.

If we still want to deliberately break folks with this change, we
should not blame users for becoming accustomed to the traditional
behaviour and pretend as if burdening them to change their scripts
is within our rights.  We should be a lot more apologetic in the
backward compatibility notes than what you wrote in the above.

Having said that, quite honestly, I do not think this new behaviour
deserves to be a new default from the day one, with need for an
apology to existing users by the project.  Given that the users have
lived with the current behaviour practically forever in Git's
timescale and that not changing the default and letting them "live
with" the status quo cannot cause any serious problem, I cannot
stand behind such a default change myself.  It should be a new
feature that is opt-in, just like any other new and useful feature..

By the way, I just noticed that the test will not pass on BSD
derived systems.  Something like this need to be squashed in if we
want to proceed further.

--- >8 --- squash --- >8 ---
Subject: [PATCH] SQUASH???

Sending "wc -l" output to a file and expecting that it has a run of
digits with terminating newline and nothing else is prone to break
on BSD derived systems, including macOS.
---
 t/t9001-send-email.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index 64f9c7c154..8323783963 100755
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
@@ -1198,7 +1198,7 @@ test_confirm_many () {
 		-2 <replies
 	echo $? >exit_sts
 	test_cmp expected_sts exit_sts || return 1
-	ls commandline* 2>/dev/null | wc -l >num_mails
+	echo $(ls commandline* 2>/dev/null | wc -l) >num_mails
 	test_cmp expected_num num_mails || return 1
 }
 
-- 
2.42.0-81-g1a190bc14a


  parent reply	other threads:[~2023-08-30  0:47 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-26  6:16 [PATCH v2] send-email: prompt-dependent exit codes Oswald Buddenhagen
2023-04-27 15:49 ` Junio C Hamano
2023-05-02 19:04   ` Felipe Contreras
2023-08-07 16:58   ` [PATCH v3] " Oswald Buddenhagen
2023-08-07 18:55     ` Junio C Hamano
2023-08-08 10:55       ` Oswald Buddenhagen
2023-08-08 16:08         ` Junio C Hamano
2023-08-08 19:11           ` Oswald Buddenhagen
2023-08-09 17:15           ` [PATCH v4] " Oswald Buddenhagen
2023-08-09 19:15             ` Junio C Hamano
2023-08-10 10:00               ` Oswald Buddenhagen
2023-08-10 19:56                 ` Junio C Hamano
2023-08-11 12:11                   ` Oswald Buddenhagen
2023-08-21 17:07                   ` [PATCH v5] " Oswald Buddenhagen
2023-08-21 17:57                     ` Junio C Hamano
2023-08-21 18:57                       ` Oswald Buddenhagen
2023-08-30  0:46                     ` Junio C Hamano [this message]
2023-08-30 10:06                       ` Oswald Buddenhagen

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

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

  git send-email \
    --in-reply-to=xmqq3501bbmf.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=oswald.buddenhagen@gmx.de \
    --cc=phillip.wood123@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.
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).