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>,
"SZEDER Gábor" <szeder.dev@gmail.com>
Subject: Re: [PATCH] completion: clear cached --options when sourcing the completion script
Date: Fri, 23 Mar 2018 16:14:45 +0100 [thread overview]
Message-ID: <CAM0VKjm3WKkxjEN09Dv1wUnuBf8CSsUvmLjmSVb1fbHTyAdXEQ@mail.gmail.com> (raw)
In-Reply-To: <20180322141604.15957-1-szeder.dev@gmail.com>
On Thu, Mar 22, 2018 at 3:16 PM, SZEDER Gábor <szeder.dev@gmail.com> wrote:
> Add tests to ensure that these variables are indeed cleared when the
> completion script is sourced; not just the variables caching options,
> but all other caching variables, i.e. the variables caching commands,
> porcelain commands and merge strategies as well.
> +test_expect_success '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" &&
> + verbose test -z "$__git_merge_strategies"
> +'
Hang on, this test fails in the GETTEXT_POISON build.
The thing is, we get the merge strategies with this piece of code in
__git_list_merge_strategies() in master:
LANG=C LC_ALL=C git merge -s help 2>&1 |
sed -n -e '/[Aa]vailable strategies are: /,/^$/{
# a couple of s/// commands
}'
and that '/[Aa]vailable strategies are: /' won't match in a
GETTEXT_POISON-ed output, because that string is translated.
I think for now (-rc phase) we should just drop this test, and in the
future we should consider adding a 'git merge --list-strategies' option.
next prev parent reply other threads:[~2018-03-23 15:14 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 [this message]
2018-03-23 17:24 ` Junio C Hamano
2018-03-23 17:35 ` Junio C Hamano
2018-03-26 11:55 ` SZEDER Gábor
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=CAM0VKjm3WKkxjEN09Dv1wUnuBf8CSsUvmLjmSVb1fbHTyAdXEQ@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).