Re: [PATCH v10 6/9] ls-tree.c: support --object-only option for "git-ls-tree"

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

 



On Fri, Jan 14, 2022 at 7:59 PM Ævar Arnfjörð Bjarmason
<avarab@xxxxxxxxx> wrote:

> Yes, you get the functionality you need with a simple alias of
> --format='%(objectname)' to --object-name (or whatever), so the only
> reason to carry the extra code is for optimization.
>
> I wonder if the extra difference in performance is still something you
> care about, or if just the --format implementation would be OK.
>
> But in any case, starting with a simpler implementation and testing it
> makes the progression easier to reason about.

Actually, at first, I wanted to achieve this in a simple way, as the
"--object-only" implementation.

With the discussion in the community, I think both of them can achieve
this purpose. "--object-only" is more intuitive, while "--format "is
more flexible.
For example, if the terminal supports automatic completion, the function of
this option can be clearly known with typing TAB and lower costs of use and
understanding. "--format"  also works, but maybe have to check the help
document to see if there are fields that support the same purpose.

Because the community had a different opinion about it. Junio, might prefer
an "--object-only" approach, if I understand the context correctly.

So I have some inclination to support both. However, I can accept that only
"--format" is supported.

So in the next patch, I hope to do some refactoring of the commit to support
"--object-only" as the top commit. If in the end, we decide that "--format" is
enough, we can discard the top "--object-only" commit.

I know you guys currently are busy on the new 2.35 release, so a later reply
is OK.

Thanks.




[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