Re: [PATCH v2 08/16] for-each-ref: partly change <object> to <commit> in help
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Mar 21, 2017, 18:50 UTC
- Message-ID
- <CACBZZX6VxxYD1ev0K4jxyUmqxFpALopkHTUFp4iFtYfSuOgrjQ@mail.gmail.com>
- In-Reply-To
- <xmqqwpbipjk9.fsf@gitster.mtv.corp.google.com>
On Tue, Mar 21, 2017 at 7:32 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 14 quoted lines
> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes: > >> Change mentions of <object> to <commit> in the help output of >> for-each-ref as appropriate. >> >> Both --[no-]merged and --contains only take commits, but --points-at >> can take any object, such as a tag pointing to a tree or blob. >> >> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> >> --- > > This definitely is a correction worth doing. > > 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
3Show 17 quoted lines
>> builtin/for-each-ref.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/builtin/for-each-ref.c b/builtin/for-each-ref.c
>> index df41fa0350..1a5ed20f59 100644
>> --- a/builtin/for-each-ref.c
>> +++ b/builtin/for-each-ref.c
>> @@ -8,8 +8,8 @@
>> static char const * const for_each_ref_usage[] = {
>> N_("git for-each-ref [<options>] [<pattern>]"),
>> N_("git for-each-ref [--points-at <object>]"),
>> - N_("git for-each-ref [(--merged | --no-merged) [<object>]]"),
>> - N_("git for-each-ref [--contains [<object>]]"),
>> + N_("git for-each-ref [(--merged | --no-merged) [<commit>]]"),
>> + N_("git for-each-ref [--contains [<commit>]]"),
>> NULL
>> };