Re: [PATCH v2 7/9] connect: tell server that the client understands v1

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

Re: [PATCH v2 7/9] connect: tell server that the client understands v1

From: Junio C Hamano <hidden>
Date: 2017-09-27 06:29:43

Junio C Hamano [off-list ref] writes:
quoted
+	# Client requested to use protocol v1
+	grep "version=1" log &&
+	# Server responded using protocol v1
+	grep "clone< version 1" log
This looked a bit strange to check "clone< version 1" for one
direction, but did not check "$something> version 1" for the other
direction.  Doesn't "version=1" end up producing 2 hits?

Not a complaint, but wondering if we can write it in such a way that
does not have to make readers wonder.
Ah, the check for "version=1" is a short-hand for

	grep "clone> git-upload-pack ...\\0\\0version=1\\0$" log

and the symmetry I sought is already there.  So ignore the above; if
we wanted to make the symmetry more explicit, it would not hurt to
spell the first one as

	grep "clone> .*\\0\\0version=1\\0$" log

though.

Re: [PATCH v2 7/9] connect: tell server that the client understands v1

From: Brandon Williams <hidden>
Date: 2017-09-29 21:32:46

On 09/27, Junio C Hamano wrote:
Junio C Hamano [off-list ref] writes:
quoted
quoted
+	# Client requested to use protocol v1
+	grep "version=1" log &&
+	# Server responded using protocol v1
+	grep "clone< version 1" log
This looked a bit strange to check "clone< version 1" for one
direction, but did not check "$something> version 1" for the other
direction.  Doesn't "version=1" end up producing 2 hits?

Not a complaint, but wondering if we can write it in such a way that
does not have to make readers wonder.
Ah, the check for "version=1" is a short-hand for

	grep "clone> git-upload-pack ...\\0\\0version=1\\0$" log

and the symmetry I sought is already there.  So ignore the above; if
we wanted to make the symmetry more explicit, it would not hurt to
spell the first one as

	grep "clone> .*\\0\\0version=1\\0$" log
I think you need three '\' to get an escaped backslash, but I agree,
I'll spell this out more explicitly in the tests.
though.
-- 
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