Re: [PATCH v2 08/16] for-each-ref: partly change <object> to <commit> in help
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 21, 2017, 19:16 UTC
- Message-ID
- <xmqqy3vyo2yx.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <CACBZZX6VxxYD1ev0K4jxyUmqxFpALopkHTUFp4iFtYfSuOgrjQ@mail.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 12 quoted lines
> On Tue, Mar 21, 2017 at 7:32 PM, Junio C Hamano <gitster@pobox.com> wrote: > >> Do these strictly require commit, or does any commit-ish also do? > > commit-ish, but that's a good point, and could be the subject of a > future follow-up patch. Right now most of the things that say <commit> > really mean <commit-ish>: > > $ git grep '<commit>' -- builtin|wc -l > 18 > $ git grep '<commit.*ish>' -- builtin|wc -l > 3
My gut feeling is that anywhere we say a <commit> for Porcelain commands, we should be also accepting a <commit-ish>, and it is not worth repeating to users that these command accept commit-ish. So I think it is better to leave these as <commit>, and to add special note to places where the commands insist taking <commit> and not <commit-ish>. They should be minorities, at least for Porcelain commands. The same for <tree> vs <tree-ish>.
Thanks.