Re: [PATCH v2 02/38] rename_ref_available(): add docstring
- From
Jakub Narębski <jnareb@gmail.com>
- Date
- Sep 6, 2016, 14:25 UTC
- Message-ID
- <236a95a0-59d4-3788-9104-5ca299119e66@gmail.com>
- In-Reply-To
- <f89d56ef0841a3cc35689436c0b9473c6773d22d.1473003902.git.mhagger@alum.mit.edu>
W dniu 04.09.2016 o 18:08, Michael Haggerty pisze:
Show 11 quoted lines
> +/* > + * 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