From: "SZEDER Gábor" <szeder.dev@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>,
"Git mailing list" <git@vger.kernel.org>
Subject: Re: [PATCH] completion: clear cached --options when sourcing the completion script
Date: Mon, 26 Mar 2018 13:55:20 +0200 [thread overview]
Message-ID: <CAM0VKjnVM6sjkZjQNLtr+rm34=pPfihWzrk6L+r=ky5UZ_JsrA@mail.gmail.com> (raw)
In-Reply-To: <xmqq7eq2k840.fsf@gitster-ct.c.googlers.com>
On Fri, Mar 23, 2018 at 6:35 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Junio C Hamano <gitster@pobox.com> writes:
>> I'd say we should just add !GETTEXT_POISON prereq to the problematic
>> tests.
> IOW, this is the minumum required.
Thanks for already committing the fix, I couldn't get around to it.
> By the way, shouldn't we be running the body of these new tests
> inside a subshell? Otherwise a dot-sourcing by an earlier test of
> these new ones _will_ affect all the subsequent tests.
I don't think it matters. All new tests first initialize the variable
they are interested in before sourcing the completion script, to avoid
false successes caused by the variable being empty to begin with.
And it shouldn't matter, either, because in the end the users will
source the completion script into their main shell process, and it
should just work no matter how many times it gets sourced.
> t/t9902-completion.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh
> index 4c86adadf2..b7f5b1e632 100755
> --- a/t/t9902-completion.sh
> +++ b/t/t9902-completion.sh
> @@ -1511,7 +1511,7 @@ test_expect_success 'sourcing the completion script clears cached porcelain comm
> verbose test -z "$__git_porcelain_commands"
> '
>
> -test_expect_success 'sourcing the completion script clears cached merge strategies' '
> +test_expect_success !GETTEXT_POISON 'sourcing the completion script clears cached merge strategies' '
> __git_compute_merge_strategies &&
> verbose test -n "$__git_merge_strategies" &&
> . "$GIT_BUILD_DIR/contrib/completion/git-completion.bash" &&
prev parent reply other threads:[~2018-03-26 11:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-22 14:16 [PATCH] completion: clear cached --options when sourcing the completion script SZEDER Gábor
2018-03-22 17:06 ` Duy Nguyen
2018-03-23 15:14 ` SZEDER Gábor
2018-03-23 17:24 ` Junio C Hamano
2018-03-23 17:35 ` Junio C Hamano
2018-03-26 11:55 ` SZEDER Gábor [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='CAM0VKjnVM6sjkZjQNLtr+rm34=pPfihWzrk6L+r=ky5UZ_JsrA@mail.gmail.com' \
--to=szeder.dev@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=pclouds@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).