Re: [PATCH] completion: new config var to use --sort in for-each-ref

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

 



"Nelson Benitez Leon via GitGitGadget" <gitgitgadget@xxxxxxxxx>
writes:

> From: =?UTF-8?q?Nelson=20Ben=C3=ADtez=20Le=C3=B3n?= <nbenitezl@xxxxxxxxx>
>
> Currently when completing refs, e.g. by doing "git checkout <TAB>", all
> refs are shown in alphabetical order, this is an implicit ordering and
> cannot be changed.
>
> This commit will make the sort criteria to now be explicit, mandated by
> a new config var which will be used for the --sort=<val> of for-each-ref
>
> This new config var will have a default value of alphabetical order,
> so Git's default behaviour remains unchanged.
>
> Also add '-o nosort' to 'complete' to disable its default alphabetical
> ordering so our new explicit ordering prevails.

The usual way to compose a log message of this project is to

 - Give an observation on how the current system works in the
   present tense (so no need to say "Currently X is Y", or
   "Previously X was Y" to describe the state before your change;
   just "X is Y" is enough), and discuss what you perceive as a
   problem in it.

 - Propose a solution (optional---often, problem description
   trivially leads to an obvious solution in reader's minds).

 - Give commands to somebody editing the codebase to "make it so".
   There is no place to say "this commit will"; instead, give order
   to the code.

in this order.

> Signed-off-by: Nelson Benítez León <nbenitezl@xxxxxxxxx>
> ---


>     I've not added tests because I'm not familiar with the test machinery,
>     hopefully this is still useful.

Tests are required part of a new feature to become part of Git
codebase.  Otherwise you cannot notice if somebody else later
changes the code further and accidentally breaks your feature.

You can of course ask for help (i.e. "I'm not familiar with the test
machinery so I am not writing any" is *not* acceptable.  "I'm not
familiar with the test machinery; among those who may find this new
feature worthwhile to do, could somebody lend me a hand?" is very
good).

>     ... and I don't want to activate 2FA
>     authentication just for this ...

You could do OAuth these days, I hear?




[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