git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.

Previous: Johannes SixtNext: Junio C Hamano
Message 9 of 11 in “bundle: put strbuf_readline_fd in strbuf.c with adjustments”
  1. 1/2 bundle: put strbuf_readline_fd in strbuf.c with adjustmentsThomas Rast, Feb 22, 2012
  2. 2/2 bundle: use a strbuf to scan the log for boundary commitsThomas Rast, Feb 22, 2012
  3. Junio C HamanoFeb 22, 2012
  4. Thomas RastFeb 22, 2012
  5. Junio C HamanoFeb 22, 2012
  6. Jeff KingFeb 22, 2012
  7. Jeff KingFeb 22, 2012
  8. Johannes SixtFeb 22, 2012
  9. Junio C HamanoFeb 23, 2012
  10. Junio C HamanoFeb 23, 2012
  11. Jeff KingFeb 22, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.