Re: [PATCH v8 2/4] cat-file: teach cat-file a '--literally' option
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Apr 21, 2015, 19:40 UTC
- Message-ID
- <CAPig+cRmPv5u_OCtUPNoYOUcOoa9xn++Xw-rkD6EP6_eq0YvEQ@mail.gmail.com>
- In-Reply-To
- <20150421101641.GA13202@hashpling.org>
On Tue, Apr 21, 2015 at 6:16 AM, Charles Bailey <charles@hashpling.org> wrote:
Show 22 quoted lines
> On Mon, Apr 20, 2015 at 09:22:47PM +0530, karthik nayak wrote: >> On 04/20/2015 02:49 PM, Charles Bailey wrote: >> >As far as I could tell - and please correct me if I've misunderstood, >> >cat-file's literally is about dealing with unrecognized types whereas >> >hash-object's --literally is about both creating objects with bad types >> >and invalid objects of "recognized" types. This latter scenario is where >> >the option name "literally" makes the most sense. >> Yes. What you're saying is correct, but it also makes sense as we're asking >> "cat-file" to give us information about the object irrespective of the type of the >> object, hence asking it to literally print the information. Also it stays as a compliment >> to "hash-object --literally", which is already existing. > > OK, I think you've hit the main point which I was trying to make. > > To me, "literally" means "without transformation" or "exactly as > written/recorded/transmitted" (which -t/-s do anyway) and doesn't really > encompass the "irrespective of type" meaning that it has been given here. > > In any case, I've made my point so I won't labour it any further. I > think that --no-validation or --allow-any-type might be more accurate > but if everyone else is happy enough with --literally then I'm happy to > live with that too.
It's easy to be blinded into thinking that cat-file's new option should be named --literally since it was inspired by the --literally option of hash-object, but indeed it may not be the best choice.
In addition to your above suggestions (and --unchecked which you proposed earlier), if we take inspiration from existing Git options, perhaps one of the following (or something derived from them) would be better?
--force
--ignore-errors
--no-check
--unsafe
--no-strict
--aggressiveOr, some pure made-up bike-shedding?
--try-harder
--allow-bogus-type
--ignore-bogus-type
--loose
--gently