From: "SZEDER Gábor" <szeder.dev@gmail.com>
To: Duy Nguyen <pclouds@gmail.com>
Cc: Git mailing list <git@vger.kernel.org>
Subject: Re: [PATCH/RFC 0/2] Automate updating git-completion.bash a bit
Date: Mon, 22 Jan 2018 19:03:24 +0100 [thread overview]
Message-ID: <CAM0VKj=NeQ_BthG087vswP=mCizXPBcfmCAa9haH4N5MRCNRWQ@mail.gmail.com> (raw)
In-Reply-To: <20180117093432.GA19189@ash>
On Wed, Jan 17, 2018 at 10:34 AM, Duy Nguyen <pclouds@gmail.com> wrote:
> Actually I forgot another option. What if we automate updating the
> script at "compile" time instead of calling git at run time? E.g. with
> something like below, a contributor could just run
>
> make update-completion
>
> then add git-completion.bash changes to the same patch that introduces
> new options. If they forget
They inevitably will :)
If contributors have to remember something anyway, then they might
as well remember to update the completion script in the first place.
Another alternative would be to extend t9902 with (preferably
auto-generated) tests to compare the output of 'git $cmd
--git-completion-helper' with 'run_completion "git $cmd --"'. Then
contributors wouldn't have to remember anything, because everyone runs
the full test suite every time anyway, right?
However, that would result in some code churn initially, because I
suspect the options are listed in different order in the command and
in the completion script.
All in all I don't think it would trump getting all --options straight
from the commands themselves.
next prev parent reply other threads:[~2018-01-22 18:03 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-16 10:36 [PATCH/RFC 0/2] Automate updating git-completion.bash a bit Nguyễn Thái Ngọc Duy
2018-01-16 10:36 ` [PATCH 1/2] parse-options: support --git-completion-helper Nguyễn Thái Ngọc Duy
2018-01-16 18:25 ` Jacob Keller
2018-01-17 0:21 ` Duy Nguyen
2018-01-16 23:46 ` Junio C Hamano
2018-01-17 0:27 ` Duy Nguyen
2018-01-16 10:37 ` [PATCH 2/2] git-completion: use --git-completion-helper Nguyễn Thái Ngọc Duy
2018-01-17 0:51 ` [PATCH/RFC 0/2] Automate updating git-completion.bash a bit SZEDER Gábor
2018-01-17 9:16 ` Duy Nguyen
2018-01-17 9:34 ` Duy Nguyen
2018-01-22 18:03 ` SZEDER Gábor [this message]
2018-01-23 9:59 ` Duy Nguyen
2019-04-11 11:10 ` Duy Nguyen
2019-04-11 11:11 ` Duy Nguyen
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='CAM0VKj=NeQ_BthG087vswP=mCizXPBcfmCAa9haH4N5MRCNRWQ@mail.gmail.com' \
--to=szeder.dev@gmail.com \
--cc=git@vger.kernel.org \
--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).