{"thread":{"id":"3514","subject":"[PATCH 2/3] annotate: Add a basic set of test cases.","startedAt":"2006-03-02T05:23:37Z","lastAt":"2006-03-02T05:23:37Z","messageCount":3,"participants":["Ryan Anderson"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"17015","messageId":"11412770172128-git-send-email-ryan@michonline.com","threadId":"3514","inReplyTo":"11412770173208-git-send-email-ryan@michonline.com","subject":"[PATCH 2/3] annotate: Add a basic set of test cases.","fromName":"Ryan Anderson","fromEmail":"ryan@michonline.com","sentAt":"2006-03-02T05:23:37Z","receivedAt":"2006-03-02T05:23:37Z","isPatch":true,"sender":{"key":"ryan@michonline.com","avatar":null},"body":"Signed-off-by: Ryan Anderson <ryan@michonline.com>\n\n---\n\n t/t8001-annotate.sh |   89 +++++++++++++++++++++++++++++++++++++++++++++++++++\n 1 files changed, 89 insertions(+), 0 deletions(-)\n create mode 100755 t/t8001-annotate.sh\n\n7df39590a44352626c8d83a2b94d1ba11b24a118\ndiff --git a/t/t8001-annotate.sh b/t/t8001-annotate.sh\nnew file mode 100755\nindex 0000000..cae1794\n--- /dev/null\n+++ b/t/t8001-annotate.sh\n@@ -0,0 +1,89 @@\n+#!/bin/sh\n+\n+test_description='git-annotate'\n+. ./test-lib.sh\n+\n+test_expect_success \\\n+    'prepare reference tree' \\\n+    'echo \"1A quick brown fox jumps over the\" >file &&\n+     echo \"lazy dog\" >>file &&\n+     git add file\n+     GIT_AUTHOR_NAME=\"A\" git commit -a -m \"Initial.\"'\n+\n+test_expect_success \\\n+    'check all lines blamed on A' \\\n+    '[ $(git annotate file | awk \"{print \\$3}\" | grep -c \"A\") == 2 ]'\n+\n+test_expect_success \\\n+    'Setup new lines blamed on B' \\\n+    'echo \"2A quick brown fox jumps over the\" >>file &&\n+     echo \"lazy dog\" >> file &&\n+     GIT_AUTHOR_NAME=\"B\" git commit -a -m \"Second.\"'\n+\n+test_expect_success \\\n+    'Two lines blamed on A' \\\n+    '[ $(git annotate file | awk \"{print \\$3}\" | grep -c \"A\") == 2 ]'\n+\n+test_expect_success \\\n+    'Two lines blamed on B' \\\n+    '[ $(git annotate file | awk \"{print \\$3}\" | grep -c \"B\") == 2 ]'\n+\n+test_expect_success \\\n+    'merge-setup part 1' \\\n+    'git checkout -b branch1 master &&\n+     echo \"3A slow green fox jumps into the\" >> file &&\n+     echo \"well.\" >> file &&\n+     GIT_AUTHOR_NAME=\"B1\" git commit -a -m \"Branch1-1\"'\n+\n+test_expect_success \\\n+    'Two lines blamed on A' \\\n+    '[ $(git annotate file | awk \"{print \\$3}\" | grep -c \"^A$\") == 2 ]'\n+\n+test_expect_success \\\n+    'Two lines blamed on B' \\\n+    '[ $(git annotate file | awk \"{print \\$3}\" | grep -c \"^B$\") == 2 ]'\n+\n+test_expect_success \\\n+    'Two lines blamed on B1' \\\n+    '[ $(git annotate file | awk \"{print \\$3}\" | grep -c \"^B1$\") == 2 ]'\n+\n+test_expect_success \\\n+    'merge-setup part 2' \\\n+    'git checkout -b branch2 master &&\n+     sed -i -e \"s/2A quick brown/4A quick brown lazy dog/\" file &&\n+     GIT_AUTHOR_NAME=\"B2\" git commit -a -m \"Branch2-1\"'\n+\n+test_expect_success \\\n+    'Two lines blamed on A' \\\n+    '[ $(git annotate file | awk \"{print \\$3}\" | grep -c \"^A$\") == 2 ]'\n+\n+test_expect_success \\\n+    'One line blamed on B' \\\n+    '[ $(git annotate file | awk \"{print \\$3}\" | grep -c \"^B$\") == 1 ]'\n+\n+test_expect_success \\\n+    'One line blamed on B2' \\\n+    '[ $(git annotate file | awk \"{print \\$3}\" | grep -c \"^B2$\") == 1 ]'\n+\n+\n+test_expect_success \\\n+    'merge-setup part 3' \\\n+    'git pull . branch1'\n+\n+test_expect_success \\\n+    'Two lines blamed on A' \\\n+    '[ $(git annotate file | awk \"{print \\$3}\" | grep -c \"^A$\") == 2 ]'\n+\n+test_expect_success \\\n+    'One line blamed on B' \\\n+    '[ $(git annotate file | awk \"{print \\$3}\" | grep -c \"^B$\") == 1 ]'\n+\n+test_expect_success \\\n+    'Two lines blamed on B1' \\\n+    '[ $(git annotate file | awk \"{print \\$3}\" | grep -c \"^B1$\") == 2 ]'\n+\n+test_expect_success \\\n+    'One line blamed on B2' \\\n+    '[ $(git annotate file | awk \"{print \\$3}\" | grep -c \"^B2$\") == 1 ]'\n+\n+test_done\n-- \n1.2.2.g1070\n"},{"id":"17016","messageId":"11412770173208-git-send-email-ryan@michonline.com","threadId":"3514","inReplyTo":"114127659642-git-send-email-ryan@michonline.com","subject":"[PATCH 1/3] Handle \\No newline at end of file.","fromName":"Ryan Anderson","fromEmail":"ryan@michonline.com","sentAt":"2006-03-02T05:23:37Z","receivedAt":"2006-03-02T05:23:37Z","isPatch":true,"sender":{"key":"ryan@michonline.com","avatar":null},"body":"Signed-off-by: Ryan Anderson <ryan@michonline.com>\n\n---\n\n git-annotate.perl |    6 ++++++\n 1 files changed, 6 insertions(+), 0 deletions(-)\n\ne30d9ddd62cf016124dd9f32e14809d0a38c69e2\ndiff --git a/git-annotate.perl b/git-annotate.perl\nindex f9c2c6c..d6028c9 100755\n--- a/git-annotate.perl\n+++ b/git-annotate.perl\n@@ -304,6 +304,12 @@ sub _git_diff_parse {\n \t\t\t}\n \t\t\t$ri++;\n \n+\t\t} elsif (m/^\\\\/) {\n+\t\t\t;\n+\t\t\t# Skip \\No newline at end of file.\n+\t\t\t# But this can be internationalized, so only look\n+\t\t\t# for an initial \\\n+\n \t\t} else {\n \t\t\tif (substr($_,1) ne get_line($slines,$ri) ) {\n \t\t\t\tdie sprintf(\"Line %d (%d) does not match:\\n|%s\\n|%s\\n%s => %s\\n\",\n-- \n1.2.2.g1070\n"},{"id":"17017","messageId":"11412770173678-git-send-email-ryan@michonline.com","threadId":"3514","inReplyTo":"11412770172128-git-send-email-ryan@michonline.com","subject":"[PATCH 3/3] annotate: --rev-file (-S) is not a boolean parameter","fromName":"Ryan Anderson","fromEmail":"ryan@michonline.com","sentAt":"2006-03-02T05:23:37Z","receivedAt":"2006-03-02T05:23:37Z","isPatch":true,"sender":{"key":"ryan@michonline.com","avatar":null},"body":"Signed-off-by: Ryan Anderson <ryan@michonline.com>\n\n---\n\n git-annotate.perl |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\n75846f79f31c9833303ff7d44b87b53c39f4bf9a\ndiff --git a/git-annotate.perl b/git-annotate.perl\nindex d6028c9..30f9a71 100755\n--- a/git-annotate.perl\n+++ b/git-annotate.perl\n@@ -31,7 +31,7 @@ our ($help, $longrev, $rename, $starting\n my $rc = GetOptions(\t\"long|l\" => \\$longrev,\n \t\t\t\"help|h\" => \\$help,\n \t\t\t\"rename|r\" => \\$rename,\n-\t\t\t\"rev-file|S\" => \\$rev_file);\n+\t\t\t\"rev-file|S=s\" => \\$rev_file);\n if (!$rc or $help) {\n \tusage();\n }\n-- \n1.2.2.g1070\n"}]}