Thread (47 messages) 47 messages, 4 authors, 2016-09-08

Re: [PATCH v2 02/38] rename_ref_available(): add docstring

flat view

From: Jakub Narębski <hidden>
Date: 2016-09-06 14:25:59

W dniu 04.09.2016 o 18:08, Michael Haggerty pisze:
quoted hunk ↗ jump to hunk
+/*
+ * 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help