Re: [PATCH 14/14] completion: add default merge strategies
- From
SZEDER Gábor <szeder.dev@gmail.com>
- Date
- Jul 3, 2019, 17:14 UTC
- Message-ID
- <20190703171433.GT21574@szeder.dev>
- In-Reply-To
- <CAMP44s0y_3Ltv_hnoVByTRwZrDU0+PfRo3R=Lxm6wDk+=sypJg@mail.gmail.com>
On Mon, Jun 24, 2019 at 08:11:40PM -0500, Felipe Contreras wrote:
Show 15 quoted lines
> On Mon, Jun 24, 2019 at 12:24 PM Junio C Hamano <gitster@pobox.com> wrote: > > > > Felipe Contreras <felipe.contreras@gmail.com> writes: > > > > > In case the command fails. > > > > It is unclear what you wanted to say with this. What command? > > After "git merge" fails? > > Yes. The command that __git_list_merge_strategies() uses. > > % cd /tmp > % git merge -s help > fatal: not a git repository (or any parent up to mount point /) > Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
If that command behind __git_list_merge_strategies() fails, then 'git merge -s <TAB>' won't simply list any merge strategies. However, that's not a big deal, because the command won't work without a repository anyway, so I don't see the point in adding a hard-coded list of merge strategies. And in this case $__git_merge_strategies will remain empty, so the next time the user attempts to complete a strategies while in a repository, then it will Just Work (unlike the undesired caching of options without a repository that is fixed in 69702523af (completion: do not cache if --git-completion-helper fails, 2019-06-12).