Re: [PATCH/RFC 0/2] Automate updating git-completion.bash a bit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 17, 2018 at 10:34 AM, Duy Nguyen <pclouds@xxxxxxxxx> 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.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux