Re: [PATCH v3 11/23] log_ref_setup(): separate code for create vs non-create

2 messages, 2 authors, 2017-01-01 · open the first message on its own page

Re: [PATCH v3 11/23] log_ref_setup(): separate code for create vs non-create

From: Junio C Hamano <hidden>
Date: 2017-01-01 03:28:55

Michael Haggerty [off-list ref] writes:
+			if (errno == ENOENT || errno == EISDIR) {
+				/*
+				 * The logfile doesn't already exist,
+				 * but that is not an error; it only
+				 * means that we won't write log
+				 * entries to it.
+				 */
+			} else {
It may be valid C, but an

	{
		/*
		 * an empty block without any statement,
		 * not even a null statement.
		 */
	}

always makes me a bit nervous.  Have a line with a semicolon without
anything else (other than the indent) at the end and it will read
nicer, at least to me.

Re: [PATCH v3 11/23] log_ref_setup(): separate code for create vs non-create

From: Michael Haggerty <hidden>
Date: 2017-01-01 08:45:51

On 01/01/2017 04:28 AM, Junio C Hamano wrote:
Michael Haggerty [off-list ref] writes:
quoted
+			if (errno == ENOENT || errno == EISDIR) {
+				/*
+				 * The logfile doesn't already exist,
+				 * but that is not an error; it only
+				 * means that we won't write log
+				 * entries to it.
+				 */
+			} else {
It may be valid C, but an

	{
		/*
		 * an empty block without any statement,
		 * not even a null statement.
		 */
	}

always makes me a bit nervous.  Have a line with a semicolon without
anything else (other than the indent) at the end and it will read
nicer, at least to me.
That's a form of superstition that I haven't encountered before ;-) but
I'll change 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