Re: What's cooking in git.git (Apr 2010, #06; Sat, 17)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff King <peff@xxxxxxxx> writes:

> On Sat, Apr 17, 2010 at 11:16:00PM -0700, Junio C Hamano wrote:
>
>> * jg/auto-initialize-notes-with-percent-n-in-format (2010-04-13) 1 commit
>>  - pretty: Initialize notes if %N is used
>
> I think the last round looked good, and this would ideally go into
> v1.7.1, as it fixes a segfault. It is getting a bit late in the -rc
> cycle, though. I guess the other option is to close the segfault with a
> one-liner and just make %N a no-op for v1.7.1, and then fix it right for
> v1.7.2.  I think I would prefer to have Johannes' patch right away,
> though.

It is an assertion failure but the fix is low-impact enough to appear in
the coming release.

 t/t3301-notes.sh |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/t/t3301-notes.sh b/t/t3301-notes.sh
index b2e7b07..64f32ad 100755
--- a/t/t3301-notes.sh
+++ b/t/t3301-notes.sh
@@ -55,6 +55,15 @@ test_expect_success 'handle empty notes gracefully' '
 	git notes show ; test 1 = $?
 '
 
+test_expect_success 'show non-existent notes entry with %N' '
+	for l in A B
+	do
+		echo "$l"
+	done >expect &&
+	git show -s --format='A%n%NB' >output &&
+	test_cmp expect output
+'
+
 test_expect_success 'create notes' '
 	git config core.notesRef refs/notes/commits &&
 	MSG=b4 git notes add &&
@@ -65,6 +74,15 @@ test_expect_success 'create notes' '
 	test_must_fail git notes show HEAD^
 '
 
+test_expect_success 'show notes entry with %N' '
+	for l in A b4 B
+	do
+		echo "$l"
+	done >expect &&
+	git show -s --format='A%n%NB' >output &&
+	test_cmp expect output
+'
+
 cat >expect <<EOF
 d423f8c refs/notes/commits@{0}: notes: Notes added by 'git notes add'
 EOF
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]