Re: [PATCH v2] Detailed diagnosis when parsing an object name fails.
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 7, 2009, 00:30 UTC
- Message-ID
- <7vtyw3bp7r.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <vpqhbs4dkjr.fsf@bauges.imag.fr>
Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
Show 6 quoted lines
>>> +extern int get_sha1_with_mode_1(const char *str, unsigned char *sha1, unsigned *mode, int fatal, const char *prefix); >> >> Do I understand correctly that "fatal" here is the same as "!gently" >> elsewhere in the API? > > It seems it is. I renamed it.
This was a pure question, not a suggestion to change it (we do name a function do_foo_gently() when there is do_foo() that does the same but reports errors more noisily, though). I found the name "fatal" a bit confusing as I at first couldn't tell if the caller was telling the function that it already detected a "fatal" error (and telling the function to report the fatalness) and didn't realize that the caller is instead saying "if you find an error, treat it as a fatal one" until I read it again.
I am Ok with the new "gently" name with the negative semantics as well (I see no need to change it back to "error_is_fatal").
Thanks.