From: Junio C Hamano <gitster@pobox.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
git@vger.kernel.org, msysgit@googlegroups.com
Subject: Re: [PATCH] Remove the line length limit for graft files
Date: Fri, 27 Dec 2013 16:50:11 -0800 [thread overview]
Message-ID: <xmqqd2khu7cs.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20131227223240.GG20443@google.com> (Jonathan Nieder's message of "Fri, 27 Dec 2013 14:32:40 -0800")
Jonathan Nieder <jrnieder@gmail.com> writes:
> Johannes Schindelin wrote:
>> On Fri, 27 Dec 2013, Jonathan Nieder wrote:
>
>>> Is this easy to reproduce so some interested but lazy person could
>>> write a test?
>>
>> Yep. Make 25 orphan commits, add a graft line to make the first a merge of
>> the rest.
>
> Thanks. Here's a pair of tests doing that.
>
> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
> ---
> t/annotate-tests.sh | 21 +++++++++++++++++++++
> t/t6101-rev-parse-parents.sh | 16 +++++++++++++++-
> 2 files changed, 36 insertions(+), 1 deletion(-)
Makes sense.
Thanks, both. Small lint-picking like this change to perfect the
system, as opposed to earth-shattering new shinies, tend to often
get neglected but are very much appreciated.
> diff --git a/t/annotate-tests.sh b/t/annotate-tests.sh
> index c9d105d..304c7b7 100644
> --- a/t/annotate-tests.sh
> +++ b/t/annotate-tests.sh
> @@ -116,6 +116,27 @@ test_expect_success 'blame evil merge' '
> check_count A 2 B 1 B1 2 B2 1 "A U Thor" 1
> '
>
> +test_expect_success 'blame huge graft' '
> + test_when_finished "git checkout branch2" &&
> + test_when_finished "rm -f .git/info/grafts" &&
> + graft= &&
> + for i in 0 1 2
> + do
> + for j in 0 1 2 3 4 5 6 7 8 9
> + do
> + git checkout --orphan "$i$j" &&
> + printf "%s\n" "$i" "$j" >file &&
> + test_tick &&
> + GIT_AUTHOR_NAME=$i$j GIT_AUTHOR_EMAIL=$i$j@test.git \
> + git commit -a -m "$i$j" &&
> + commit=$(git rev-parse --verify HEAD) &&
> + graft="$graft$commit "
> + done
> + done &&
> + printf "%s " $graft >.git/info/grafts &&
> + check_count -h 00 01 1 10 1
> +'
> +
> test_expect_success 'setup incomplete line' '
> echo "incomplete" | tr -d "\\012" >>file &&
> GIT_AUTHOR_NAME="C" GIT_AUTHOR_EMAIL="C@test.git" \
> diff --git a/t/t6101-rev-parse-parents.sh b/t/t6101-rev-parse-parents.sh
> index 7ea14ce..10b1452 100755
> --- a/t/t6101-rev-parse-parents.sh
> +++ b/t/t6101-rev-parse-parents.sh
> @@ -20,7 +20,17 @@ test_expect_success 'setup' '
> test_commit start2 &&
> git checkout master &&
> git merge -m next start2 &&
> - test_commit final
> + test_commit final &&
> +
> + test_seq 40 |
> + while read i
> + do
> + git checkout --orphan "b$i" &&
> + test_tick &&
> + git commit --allow-empty -m "$i" &&
> + commit=$(git rev-parse --verify HEAD) &&
> + printf "$commit " >>.git/info/grafts
> + done
> '
>
> test_expect_success 'start is valid' '
> @@ -79,6 +89,10 @@ test_expect_success 'final^1^! = final^1 ^final^1^1 ^final^1^2' '
> test_cmp expect actual
> '
>
> +test_expect_success 'large graft octopus' '
> + test_cmp_rev_output b31 "git rev-parse --verify b1^30"
> +'
> +
> test_expect_success 'repack for next test' '
> git repack -a -d
> '
> --
> 1.8.5.1
>
> --
--
--
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.
You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
---
You received this message because you are subscribed to the Google Groups "msysGit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
next prev parent reply other threads:[~2013-12-28 0:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-27 20:49 [PATCH] Remove the line length limit for graft files Johannes Schindelin
2013-12-27 21:04 ` Jonathan Nieder
2013-12-27 21:14 ` Johannes Schindelin
2013-12-27 21:59 ` Jonathan Nieder
2013-12-27 22:51 ` Johannes Schindelin
2013-12-27 22:32 ` Jonathan Nieder
2013-12-27 22:53 ` Johannes Schindelin
2013-12-28 0:50 ` Junio C Hamano [this message]
2013-12-27 21:48 ` Junio C Hamano
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=xmqqd2khu7cs.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=jrnieder@gmail.com \
--cc=msysgit@googlegroups.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).