From: Junio C Hamano Date: Thu, 23 Feb 2012 03:20:25 GMT Subject: Re: [PATCH 2/2] bundle: use a strbuf to scan the log for boundary commits Message-ID: <7vy5ru5j7q.fsf@alter.siamese.dyndns.org> In-Reply-To: Thomas Rast writes: > +# 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.