From: Junio C Hamano <gitster@pobox.com>
To: Nelson Benitez Leon <nbenitezl@gmail.com>
Cc: git@vger.kernel.org,
"Nelson Benitez Leon via GitGitGadget" <gitgitgadget@gmail.com>
Subject: Re: [PATCH] completion: new config var to use --sort in for-each-ref
Date: Sun, 27 Jul 2025 15:21:19 -0700 [thread overview]
Message-ID: <87bjp56zs0.fsf@gitster.g> (raw)
In-Reply-To: <pull.1946.git.1753627773304.gitgitgadget@gmail.com> (Nelson Benitez Leon via GitGitGadget's message of "Sun, 27 Jul 2025 14:49:33 +0000")
"Nelson Benitez Leon via GitGitGadget" <gitgitgadget@gmail.com>
writes:
> From: =?UTF-8?q?Nelson=20Ben=C3=ADtez=20Le=C3=B3n?= <nbenitezl@gmail.com>
>
> 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@gmail.com>
> ---
> 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?
next prev parent reply other threads:[~2025-07-27 22:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-27 14:49 [PATCH] completion: new config var to use --sort in for-each-ref Nelson Benitez Leon via GitGitGadget
2025-07-27 15:06 ` Nelson Benítez León
2025-07-27 22:21 ` Junio C Hamano [this message]
2025-07-28 17:13 ` SZEDER Gábor
-- strict thread matches above, loose matches on Subject: below --
2025-06-08 16:21 Nelson Benítez León
2025-06-27 19:15 ` D. Ben Knoble
2025-06-27 19:47 ` Kristoffer Haugsbakk
2025-06-27 19:53 ` D. Ben Knoble
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bjp56zs0.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=nbenitezl@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.
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 NNTP newsgroup(s).