public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Shaoxuan Yuan <shaoxuan.yuan02@gmail•com>
Cc: git@vger•kernel.org, Taylor Blau <me@ttaylorr•com>,
	ZheNing Hu <adlternative@gmail•com>,
	christian.couder@gmail•com
Subject: Re: [GSoC] Add –no-sort option for git-for-each-ref
Date: Mon, 31 Jan 2022 21:33:45 -0800	[thread overview]
Message-ID: <xmqqzgnbf8w6.fsf@gitster.g> (raw)
In-Reply-To: <CAJyCBOTpmKCHaYEvNc1-r_Rs2OWMsyCO7P6iSeM78QcjjcPuHQ@mail.gmail.com> (Shaoxuan Yuan's message of "Tue, 1 Feb 2022 11:23:17 +0800")

Shaoxuan Yuan <shaoxuan.yuan02@gmail•com> writes:

> On Tue, Jan 25, 2022 at 5:59 PM Shaoxuan Yuan <shaoxuan.yuan02@gmail•com> wrote:
>>
>> Hi git community,
>>
>> I'm considering if this microproject
>> [https://git.github.io/Outreachy-23-Microprojects/#add-no-sort-option-for-git-for-each-ref]
>>  is a good option for now. I want to spend some time on it and see if
>> I can come up with something.

I am fairly negative on that entry in the micro-project list (no, it
is not your fault), because

 (1) the one that is described there is fairly useless and I do not
     think we want to take in my tree at all.

 (2) a variant that is any useful would be a bit too large for a
     micro-project

As the explanatory text there says, the code should be able to
figure out when it does not need to make an extra ref_array_sort()
call, without being told by the user.

A smaller and more appropriate "add --no-sort and when it is given,
skip the call to ref_array_sort()" is much easier to do, but it is
very much useless.

If we were to spend any project resources (both developer's time and
reviewers' time), I'd rather not to see such an option added---once
we add a feature, we'd have to maintain it.  Rather, it would be
much better use of our time to do "automatically figure out when we
do not have to sort", and with that feature, nobody needs to use the
"--no-sort" option at all.

Such an "automatically skip the call to ref_array_sort()" would be
doable by a developer who may be relatively unfamiliar with our
codebase, but is still a bit too large for a micro-project, which I
expect anybody to be able to code during a lunch break and spend
more time on review exchanges on the list.

  reply	other threads:[~2022-02-01  5:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-25  9:59 [GSoC] Add –no-sort option for git-for-each-ref Shaoxuan Yuan
2022-02-01  3:23 ` Shaoxuan Yuan
2022-02-01  5:33   ` Junio C Hamano [this message]
2022-02-01  6:01     ` Shaoxuan Yuan

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=xmqqzgnbf8w6.fsf@gitster.g \
    --to=gitster@pobox$(echo .)com \
    --cc=adlternative@gmail$(echo .)com \
    --cc=christian.couder@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=me@ttaylorr$(echo .)com \
    --cc=shaoxuan.yuan02@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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