git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Rubén Justo" <rjusto@gmail.com>
To: Andrei Rybak <rybak.a.v@gmail.com>, Git List <git@vger.kernel.org>
Cc: Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 3/3] checkout: warn when unreachable commits after using --orphan
Date: Fri, 28 Apr 2023 01:09:36 +0200	[thread overview]
Message-ID: <a746089f-945e-df64-d261-61a212f79c7b@gmail.com> (raw)
In-Reply-To: <033bd734-9c32-e5a2-3f5c-c851e4e3bc5d@gmail.com>

On 27/4/23 2:28, Andrei Rybak wrote:
> On 23/04/2023 00:19, Rubén Justo wrote:
>> diff --git a/t/t2020-checkout-detach.sh b/t/t2020-checkout-detach.sh
>> index 2eab6474f8..6762a9a572 100755
>> --- a/t/t2020-checkout-detach.sh
>> +++ b/t/t2020-checkout-detach.sh
>> @@ -124,6 +124,15 @@ test_expect_success 'checkout warns on orphan commits: output' '
>>       check_orphan_warning stderr "2 commits"
>>   '
>>   +test_expect_success 'checkout --orphan warns on orphan commits' '
>> +    git checkout "$orphan2" &&
>> +    git checkout --orphan orphan 2>stderr
>> +'
>> +
>> +test_expect_success 'checkout --orphan warns on orphan commits: output' '
>> +    check_orphan_warning stderr "2 commits"
>> +'
> 
> These two tests could be a single test.
> 
>     test_expect_success 'checkout --orphan warns on orphan commits' '
>         git checkout "$orphan2" &&
>         git checkout --orphan orphan 2>stderr &&
>         check_orphan_warning stderr "2 commits"
> 

OK
    '
> 
> Validating output like this in a separate step is an artifact of
> the old way of checking localized strings.  Tests were split into
> two in f06f08b78c ("i18n: mark checkout plural warning for
> translation", 2011-04-10) and then prerequisite C_LOCALE_OUTPUT
> was removed in f2c8c8007c ("i18n: use test_i18ngrep in t2020,
> t2204, t3030, and t3200", 2011-04-12).  Usage of test_i18ngrep
> was then removed in 1108cea7f8 ("tests: remove most uses of
> test_i18ncmp", 2021-02-11).

Thank you!

      reply	other threads:[~2023-04-27 23:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-22 22:10 [PATCH 0/3] warn when unreachable commits are left behind Rubén Justo
2023-04-22 22:19 ` [PATCH 1/3] checkout: move orphaned_commit_warning() Rubén Justo
2023-04-22 22:19 ` [PATCH 2/3] worktree: warn when removing a worktree with orphan commits Rubén Justo
2023-04-24 20:28   ` Junio C Hamano
2023-04-26 22:29     ` Rubén Justo
2023-04-27  5:46       ` Junio C Hamano
2023-04-27  6:16         ` Eric Sunshine
2023-04-28  0:49           ` Junio C Hamano
2023-04-27 23:08         ` Rubén Justo
2023-04-22 22:19 ` [PATCH 3/3] checkout: warn when unreachable commits after using --orphan Rubén Justo
2023-04-27  0:28   ` Andrei Rybak
2023-04-27 23:09     ` Rubén Justo [this message]

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=a746089f-945e-df64-d261-61a212f79c7b@gmail.com \
    --to=rjusto@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=rybak.a.v@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).