Thread (234 messages) flat view 234 messages, 5 authors, 2017-04-07

Re: [PATCH v6 18/27] files-backend: replace submodule_allowed check in files_downcast()

From: Michael Haggerty <hidden>
Date: 2017-03-29 10:58:36

On 03/26/2017 04:16 AM, Duy Nguyen wrote:
On Mon, Mar 20, 2017 at 4:18 AM, Michael Haggerty [off-list ref] wrote:
quoted
quoted
+/* ref_store_init flags */
+#define REF_STORE_READ               (1 << 0)
I asked [1] in reply to v5 whether `REF_STORE_READ` is really necessary
but I don't think you replied. Surely a reference store that we can't
read would be useless? Can't we just assume that any `ref_store` is
readable and drop this constant?
I deleted it then I realized many lines like these

    files_downcast(ref_store, REF_STORE_READ, "read_raw_ref");

would become

    files_downcast(ref_store, 0, "read_raw_ref");

I think for newcomers, the former gives a better hint what the second
argument is than a plain zero in the latter, so I'm inclined to keep
it.
That's OK with me; I don't feel strongly about it.

Michael
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help