Re: [PATCH 04/14] connect: rewrite feature parsing to work on string_list
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 4, 2016, 20:13 UTC
- Message-ID
- <xmqqr3dhfuo9.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <1461972887-22100-5-git-send-email-sbeller@google.com>
Stefan Beller <sbeller@google.com> 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.
Show 14 quoted lines
> 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 <sbeller@google.com> > --- > 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?