Re: [PATCH 2/2] bundle: use a strbuf to scan the log for boundary commits
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 23, 2012, 03:20 UTC
- Message-ID
- <7vy5ru5j7q.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <fa1553d59714fd89fdab1bf54af19ac631a30a8c.1329939233.git.trast@student.ethz.ch>
Thomas Rast <trast@student.ethz.ch> writes:
Show 16 quoted lines
> +# If "ridiculous" is at least 1004 chars, this traps a bug in old
> +# versions where the resulting 1025-char line (with --pretty=oneline)
> +# was longer than a 1024-char buffer
> +test_expect_success 'ridiculously long subject in boundary' '
> +
> + : > file4 &&
> + test_tick &&
> + git add file4 &&
> + printf "abcdefghijkl %s\n" $(seq 1 100) | git commit -F - &&
> + test_commit fifth &&
> + git bundle create long-subject-bundle.bdl HEAD^..HEAD &&
> + git fetch long-subject-bundle.bdl &&
> + sed -n "/^-/{p;q}" long-subject-bundle.bdl > boundary &&
> + grep "^-$_x40 " boundary
> +
> +'Hmm, aside from the use of seq J6t mentioned, I am not sure what this is testing.
I thought the point is to make "--oneline" output produce a long line whose 1024th character is '-' and make the fgets() based parser to mistake it as the beginning of a line that records a boundary commit, but you do not seem to have any '-' there.