git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: ZheNing Hu <adlternative@gmail.com>
Cc: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"ZheNing Hu via GitGitGadget" <gitgitgadget@gmail.com>,
	"Git List" <git@vger.kernel.org>,
	"Christian Couder" <christian.couder@gmail.com>,
	"Brandon Williams" <bmwill@google.com>,
	"Stefan Beller" <sbeller@google.com>
Subject: Re: [PATCH] ls-files.c: add --only-object-name option
Date: Wed, 08 Jun 2022 09:09:24 -0700	[thread overview]
Message-ID: <xmqq7d5rrvbf.fsf@gitster.g> (raw)
In-Reply-To: <CAOLTT8Sz3q2db1fRcHp7Exnarw4sMCnUfAF6bot+pwYxmXJjiw@mail.gmail.com> (ZheNing Hu's message of "Wed, 8 Jun 2022 22:38:47 +0800")

ZheNing Hu <adlternative@gmail.com> writes:

>> But in any case shouldn't this be called --name-only to go with "git
>> ls-tree"'s version of this? Or is there some subtle difference I'm
>> missing...?
>
> Eh, git ls-tree --name-only will only show file paths, so maybe
> --only-object-name will be better than --object-name-only in git
> ls-files.

Yeah, it is not "--name-only" which is about paths, but
"--object-name-only" would be more correct but it is a tad long.

I think ls-tree learned "--object-only" for that fairly recently.
When in doubt, always check the documentation of a similar command
for inspiration.

Thanks.

  reply	other threads:[~2022-06-08 16:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-06 10:01 [PATCH] ls-files.c: add --only-object-name option ZheNing Hu via GitGitGadget
2022-06-06 17:42 ` Ævar Arnfjörð Bjarmason
2022-06-08 14:38   ` ZheNing Hu
2022-06-08 16:09     ` Junio C Hamano [this message]
2022-06-09 12:37 ` [PATCH v2] ls-files.c: add --object-only option ZheNing Hu via GitGitGadget
2022-06-09 19:50   ` Junio C Hamano
2022-06-12 10:24     ` ZheNing Hu
2022-06-13 17:19       ` Junio C Hamano

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=xmqq7d5rrvbf.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=adlternative@gmail.com \
    --cc=avarab@gmail.com \
    --cc=bmwill@google.com \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=sbeller@google.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).