From: Junio C Hamano Date: Wed, 04 May 2016 20:13:42 GMT Subject: Re: [PATCH 04/14] connect: rewrite feature parsing to work on string_list Message-ID: In-Reply-To: <1461972887-22100-5-git-send-email-sbeller@google.com> Stefan Beller writes: > Later on when we introduce the version 2 transport protocol, the > capabilities will not be transported in one lone string but each s/lone/long/, I think. > capability will be carried in its own pkt line. > > To reuse existing infrastructure we would either need to join the > capabilities into a single string again later or refactor the current > capability parsing to be using a data structure which fits both > versions of the transport protocol. We chose to implement the later. > > Signed-off-by: Stefan Beller > --- > builtin/receive-pack.c | 15 ++++++--- > connect.c | 82 +++++++++++++++++++++++--------------------------- > connect.h | 2 +- > upload-pack.c | 13 ++++++-- > 4 files changed, 58 insertions(+), 54 deletions(-) I am not sure if the churn is make a right tradeoff here. A loop to concatenate each segment into a strbuf before passing it to parse_feature_request would be at most 5 lines long, no?