From: Thomas Rast <trast@student.ethz.ch>
To: Junio C Hamano <gitster@pobox.com>
Cc: Johannes Sixt <j6t@kdbg.org>, Jeff King <peff@peff.net>,
Jannis Pohlmann <jannis.pohlmann@codethink.co.uk>,
<git@vger.kernel.org>
Subject: [PATCH v2 0/4] Making an elephant out of a getline() bug
Date: Thu, 23 Feb 2012 10:42:20 +0100 [thread overview]
Message-ID: <cover.1329988335.git.trast@student.ethz.ch> (raw)
In-Reply-To: <7vty2i5ie2.fsf@alter.siamese.dyndns.org>
So you all made very good points, and I don't want to repeat them.
Junio's analysis
> Perhaps we would want to squash something like this to the test to avoid
> "seq", using J6t's idea. The issue is that we do not write the end of
> line for the long boundary (because it is hidden from us), keep reading
> and rejecting bogus letters, and then the tip is written without
> terminating the boundary line. So checking boundary line is not a very
> useful test, but "fetch" and "list-heads" are.
is of course also correct for the case where the overlong line is in a
boundary commit. (The analysis about the accidentally-leading '-' is
also correct and can create a boundary line where there was none, like
in the perl case.)
The patches in this round are:
[1] new; following up on Peff's complaint that I should document
strbuf_getwholeline_fd, I found that the strbuf_get*line
documentation was also lacking.
[2] previously (1/2), now with documentation added
[3] new; Junio corrected me on the ': > file' spelling, which I added
because the start of the test used it too. So let's just fix it
outright to match the Git style all over.
[4] previously (2/2), now incorporating a strbuf_release and the
suggestions for the tests as sent by Junio. I upped the %0982 a
bit as it felt *too* tailored for the old bug, and this way
everyone can see immediately that it will exceed the 1024 char
limit (without thinking about the length of a sha and accounting
for \0 and \n).
Thomas Rast (4):
strbuf: improve strbuf_get*line documentation
bundle: put strbuf_readline_fd in strbuf.c with adjustments
t5704: match tests to modern style
bundle: use a strbuf to scan the log for boundary commits
Documentation/technical/api-strbuf.txt | 19 +++++++++++--
bundle.c | 36 +++++++-----------------
strbuf.c | 16 +++++++++++
strbuf.h | 1 +
t/t5704-bundle.sh | 47 ++++++++++++++++----------------
5 files changed, 67 insertions(+), 52 deletions(-)
--
1.7.9.1.430.g4998543
next prev parent reply other threads:[~2012-02-23 9:42 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-22 16:05 Problems with unrecognized headers in git bundles Jannis Pohlmann
2012-02-22 19:34 ` [PATCH 1/2] bundle: put strbuf_readline_fd in strbuf.c with adjustments Thomas Rast
2012-02-22 19:34 ` [PATCH 2/2] bundle: use a strbuf to scan the log for boundary commits Thomas Rast
2012-02-22 20:22 ` Junio C Hamano
2012-02-22 20:25 ` Thomas Rast
2012-02-22 20:50 ` Junio C Hamano
2012-02-22 21:00 ` Jeff King
2012-02-22 20:55 ` Jeff King
2012-02-22 22:10 ` Johannes Sixt
2012-02-23 3:20 ` Junio C Hamano
2012-02-23 3:38 ` Junio C Hamano
2012-02-23 9:42 ` Thomas Rast [this message]
2012-02-23 9:42 ` [PATCH v2 1/4] strbuf: improve strbuf_get*line documentation Thomas Rast
2012-02-23 10:08 ` Jeff King
2012-02-23 9:42 ` [PATCH v2 2/4] bundle: put strbuf_readline_fd in strbuf.c with adjustments Thomas Rast
2012-02-23 9:42 ` [PATCH v2 3/4] t5704: match tests to modern style Thomas Rast
2012-02-23 23:36 ` Junio C Hamano
2012-02-23 9:42 ` [PATCH v2 4/4] bundle: use a strbuf to scan the log for boundary commits Thomas Rast
2012-02-23 19:04 ` [PATCH v2 0/4] Making an elephant out of a getline() bug Junio C Hamano
2012-02-22 20:51 ` [PATCH 1/2] bundle: put strbuf_readline_fd in strbuf.c with adjustments Jeff King
2012-02-22 20:25 ` Problems with unrecognized headers in git bundles Øyvind A. Holm
2012-02-22 20:40 ` Øyvind A. Holm
2012-02-23 13:27 ` Erik Faye-Lund
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1329988335.git.trast@student.ethz.ch \
--to=trast@student.ethz.ch \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j6t@kdbg.org \
--cc=jannis.pohlmann@codethink.co.uk \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.