Re: [PATCH v2 6/9] connect: teach client to recognize v1 server response

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

Re: [PATCH v2 6/9] connect: teach client to recognize v1 server response

From: Junio C Hamano <hidden>
Date: 2017-09-27 01:07:34

Brandon Williams [off-list ref] writes:
+/* Returns 1 if packet_buffer is a protocol version pkt-line, 0 otherwise. */
+static int process_protocol_version(void)
+{
+	switch (determine_protocol_version_client(packet_buffer)) {
+		case protocol_v1:
+			return 1;
+		case protocol_v0:
+			return 0;
+		default:
+			die("server is speaking an unknown protocol");
+	}
+}
checkpatch.pl yells at me:

    ERROR: switch and case should be at the same indent

and we would probably want to teach "make style" the same, if we
already don't.

Re: [PATCH v2 6/9] connect: teach client to recognize v1 server response

From: Brandon Williams <hidden>
Date: 2017-09-27 17:34:17

On 09/27, Junio C Hamano wrote:
Brandon Williams [off-list ref] writes:
quoted
+/* Returns 1 if packet_buffer is a protocol version pkt-line, 0 otherwise. */
+static int process_protocol_version(void)
+{
+	switch (determine_protocol_version_client(packet_buffer)) {
+		case protocol_v1:
+			return 1;
+		case protocol_v0:
+			return 0;
+		default:
+			die("server is speaking an unknown protocol");
+	}
+}
checkpatch.pl yells at me:

    ERROR: switch and case should be at the same indent

and we would probably want to teach "make style" the same, if we
already don't.
'make style' actually already understands this, I just forgot it run it
on this change :)

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