Re: [PATCH v4 03/18] sha1_name.c: get rid of ugly get_sha1_with_mode_1()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> +/*
> + * Call this function when you know "name" given by the end user must
> + * name an object but it doesn't; the function _may_ die with a better
> + * diagnostic message than "no such object 'name'", e.g. "Path 'doc' does not
> + * exist in 'HEAD'" when given "HEAD:doc", or it may return in which case
> + * you have a chance to diagnose the error further.
> + */
> +void die_on_misspelt_object_name(const char *name, const char *prefix)

It seems unusual to have a function named die_* that is not a noreturn
function. I'd call it die_*_maybe, or diagnose_* instead.

(but as the comment above documents the behavior, it's not terribly
important, you may ignore my comment if you whish)

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]