From: Jakub Narębski Date: Tue, 06 Sep 2016 14:25:38 GMT Subject: Re: [PATCH v2 02/38] rename_ref_available(): add docstring Message-ID: <236a95a0-59d4-3788-9104-5ca299119e66@gmail.com> In-Reply-To: W dniu 04.09.2016 o 18:08, Michael Haggerty pisze: > +/* > + * Check whether an attempt to rename old_refname to new_refname would > + * cause a D/F conflict with any existing reference (other than > + * possibly old_refname). If there would be a conflict, emit an error > + * message and return false; otherwise, return true. > + * > + * Note that this function is not safe against all races with other > + * processes (though rename_ref() catches some races that might get by > + * this check). > + */ > +int rename_ref_available(const char *old_refname, const char *new_refname); Just a sidenote: does Git have a naming convention for query functions returning a boolean, for example using is_* as a prefix? That is, shouldn't it be int is_rename_ref_available(const char *old_refname, const char *new_refname); I'm sorry if this is too nitpicky -- Jakub Narębski