Subject: Re: [PATCH v8 2/4] cat-file: teach cat-file a '--literally' option

From: Junio C Hamano <[email-masked]>
Date: Thu, 16 Apr 2015 06:35:04 -0700

karthik nayak <[email-masked]> writes:

> On 04/16/2015 02:22 AM, Junio C Hamano wrote:
>
>> This is a tangent, but while we are in the vicinity, we may want to
>> rethink the help message we attach to the '-e' option.  Technically
>> the current message is _not_ wrong per-se, but it misses the point.
>> The primary thing the option does is to check the (e)xistence of the
>> named object, and the fact that it does so silently is merely a
>> detail of the operation.  The current help text omits the more
>> important part of what the option is.
>
> Would you rather check '-e' and go on to check '-p' or do you merely
> just want a different message.

I meant just a different message.  The point of -e is to see if the
thing exists.  It is good to mention _how_ the result is reported
back to the user (i.e. via the exit code, not via an output to the
standard output "exists" vs "missing", for example), but that is
secondary.  Telling how it reports is meaningless without telling
what it reports in the first place.

> ... when a user is giving the '-e' option he just expects a silent
> output if the object exists, hence we rather have the option '-e'
> behave as a mutually exclusive option...

Yes, and that is in line with the switch to OPT_CMDMODE.