Re: [PATCH] ls-files.c: add --only-object-name option
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 8, 2022, 16:09 UTC
- Message-ID
- <xmqq7d5rrvbf.fsf@gitster.g>
- In-Reply-To
- <CAOLTT8Sz3q2db1fRcHp7Exnarw4sMCnUfAF6bot+pwYxmXJjiw@mail.gmail.com>
ZheNing Hu <adlternative@gmail.com> writes:
Show 7 quoted lines
>> 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.