git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: Junio C Hamano <gitster@pobox.com>,
	Felipe Contreras <felipe.contreras@gmail.com>
Cc: git@vger.kernel.org, "SZEDER Gábor" <szeder.dev@gmail.com>
Subject: Re: [PATCH try2 0/4] completion: bash: a bunch of fixes
Date: Wed, 23 Dec 2020 07:38:12 -0600	[thread overview]
Message-ID: <5fe3484465fac_198be208bf@natae.notmuch> (raw)
In-Reply-To: <xmqqy2hoanps.fsf@gitster.c.googlers.com>

Junio C Hamano wrote:
> Felipe Contreras <felipe.contreras@gmail.com> writes:
> 
> > This is just the bug fixes from the previous series.
> >
> > These should be pretty obvious and straightforward.
> >
> > Felipe Contreras (4):
> >   completion: bash: fix prefix detection in branch.*
> >   completion: bash: add correct suffix in variables
> >   completion: bash: fix for suboptions with value
> >   completion: bash: fix for multiple dash commands
> 
> It seems that this tickles some platform specific glitches in the
> tests (the detailed CI report can only be seen when logged in, it
> seems):
> 
>     https://github.com/git/git/runs/1597682180#step:5:35614

I found that output very hard to parse, but I think I understand the
issue. It's interesting.

Apaprently macOS uses zsh by default, and in zsh, this:

  local sfx
  echo "'${sfx- }'"

Prints an empty string.

That's because in zsh "local sfx" is effectively "local sfx=''" which in
my opinion is a bug.

I did catch this issue for zsh some time ago.

I contacted the zsh developers a while ago, and that triggered a huge
discussion, since they don't consider it a bug, but they are working on
tentative changes. That's another story though.

My previous series with 26 patches didn't trigger that issue because I have
fixes on top of of __gitcomp so suffixes work correctly, and the code
can eventually be changed to:

  local sfx=" "

That makes the completion work correctly for both bash and zsh.

I see 5 courses of action:

 1. Drop the offending patch: this is wrong because the bug is still
    there, we are just not checking for it.
 2. Add a BASH prereq just for that test, or test_expect_unstable (we
    would need to add extra code for both of those).
 3. Add the fix, but not the test for the fix.
 4. Backport my __gitcomp to make the code work for both shells.
 5. Update the patch series to include all the changes up to the point
    that is fixed.

For me obviously 1 and 5 require the least work, but in 1 the bug is
still there, and in 5 the patches might get stuck more time than
necessary.

Either way I think the real problem is that not enough eyes are looking
at these patches, so it's unclear if and when they will be merged.

The issues are real though, and they are present in the current code.

Cheers.

-- 
Felipe Contreras

  reply	other threads:[~2020-12-23 13:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-19 14:06 [PATCH try2 0/4] completion: bash: a bunch of fixes Felipe Contreras
2020-12-19 14:06 ` [PATCH try2 1/4] completion: bash: fix prefix detection in branch.* Felipe Contreras
2020-12-19 14:06 ` [PATCH try2 2/4] completion: bash: add correct suffix in variables Felipe Contreras
2020-12-19 14:06 ` [PATCH try2 3/4] completion: bash: fix for suboptions with value Felipe Contreras
2020-12-19 14:06 ` [PATCH try2 4/4] completion: bash: fix for multiple dash commands Felipe Contreras
2020-12-23  9:14 ` [PATCH try2 0/4] completion: bash: a bunch of fixes Junio C Hamano
2020-12-23 13:38   ` Felipe Contreras [this message]
2020-12-23 14:19     ` SZEDER Gábor
2020-12-23 14:31       ` Felipe Contreras
2020-12-23 20:25       ` Junio C Hamano
2020-12-24  0:21         ` Felipe Contreras

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=5fe3484465fac_198be208bf@natae.notmuch \
    --to=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=szeder.dev@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).