t8001, t8002: fix "blame -L :literal" test on NetBSD

Sub-test 42 of t8001 and t8002 ("blame -L :literal") fails on NetBSD
with the following verbose output:

	git annotate  -L:main hello.c
	Author F (expected 4, attributed 3) bad
	Author G (expected 1, attributed 1) good

This is not caused by different behaviour of git blame or annotate on
that platform, but by different test input, in turn caused by a sed
command that forgets to add a newline on NetBSD.  Here's the diff of the
commit that adds "goodbye" to hello.c, for Linux:

	@@ -1,4 +1,5 @@
	 int main(int argc, const char *argv[])
	 {
		puts("hello");
	+		puts("goodbye");
	 }

We see that it adds an extra TAB, but that's not a problem.  Here's the
same on NetBSD:

	@@ -1,4 +1,4 @@
	 int main(int argc, const char *argv[])
	 {
		puts("hello");
	-}
	+		puts("goodbye");}

It also adds an extra TAB, but it is missing the newline character
after the semicolon.

The following patch gets rid of the extra TAB at the beginning, but
more importantly adds the missing newline at the end in a (hopefully)
portable way, mentioned in http://sed.sourceforge.net/sedfaq4.html.
The diff becomes this, on both Linux and NetBSD:

	@@ -1,4 +1,5 @@
	 int main(int argc, const char *argv[])
	 {
		puts("hello");
	+	puts("goodbye");
	 }

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 file changed
tree: ba1b93671efe5616ebf530be677d75da32957de4
  1. block-sha1/
  2. builtin/
  3. compat/
  4. contrib/
  5. Documentation/
  6. git-gui/
  7. git_remote_helpers/
  8. gitk-git/
  9. gitweb/
  10. mergetools/
  11. perl/
  12. po/
  13. ppc/
  14. t/
  15. templates/
  16. vcs-svn/
  17. xdiff/
  18. .gitattributes
  19. .gitignore
  20. .mailmap
  21. abspath.c
  22. aclocal.m4
  23. advice.c
  24. advice.h
  25. alias.c
  26. alloc.c
  27. archive-tar.c
  28. archive-zip.c
  29. archive.c
  30. archive.h
  31. argv-array.c
  32. argv-array.h
  33. attr.c
  34. attr.h
  35. base85.c
  36. bisect.c
  37. bisect.h
  38. blob.c
  39. blob.h
  40. branch.c
  41. branch.h
  42. builtin.h
  43. bulk-checkin.c
  44. bulk-checkin.h
  45. bundle.c
  46. bundle.h
  47. cache-tree.c
  48. cache-tree.h
  49. cache.h
  50. check-builtins.sh
  51. check-racy.c
  52. check_bindir
  53. color.c
  54. color.h
  55. column.c
  56. column.h
  57. combine-diff.c
  58. command-list.txt
  59. commit.c
  60. commit.h
  61. config.c
  62. config.mak.in
  63. config.mak.uname
  64. configure.ac
  65. connect.c
  66. connected.c
  67. connected.h
  68. convert.c
  69. convert.h
  70. copy.c
  71. COPYING
  72. credential-cache--daemon.c
  73. credential-cache.c
  74. credential-store.c
  75. credential.c
  76. credential.h
  77. csum-file.c
  78. csum-file.h
  79. ctype.c
  80. daemon.c
  81. date.c
  82. decorate.c
  83. decorate.h
  84. delta.h
  85. diff-delta.c
  86. diff-lib.c
  87. diff-no-index.c
  88. diff.c
  89. diff.h
  90. diffcore-break.c
  91. diffcore-delta.c
  92. diffcore-order.c
  93. diffcore-pickaxe.c
  94. diffcore-rename.c
  95. diffcore.h
  96. dir.c
  97. dir.h
  98. editor.c
  99. entry.c
  100. environment.c
  101. exec_cmd.c
  102. exec_cmd.h
  103. fast-import.c
  104. fetch-pack.c
  105. fetch-pack.h
  106. fixup-builtins
  107. fmt-merge-msg.h
  108. fsck.c
  109. fsck.h
  110. generate-cmdlist.sh
  111. gettext.c
  112. gettext.h
  113. git-add--interactive.perl
  114. git-am.sh
  115. git-archimport.perl
  116. git-bisect.sh
  117. git-compat-util.h
  118. git-cvsexportcommit.perl
  119. git-cvsimport.perl
  120. git-cvsserver.perl
  121. git-difftool--helper.sh
  122. git-difftool.perl
  123. git-filter-branch.sh
  124. git-instaweb.sh
  125. git-lost-found.sh
  126. git-merge-octopus.sh
  127. git-merge-one-file.sh
  128. git-merge-resolve.sh
  129. git-mergetool--lib.sh
  130. git-mergetool.sh
  131. git-p4.py
  132. git-parse-remote.sh
  133. git-pull.sh
  134. git-quiltimport.sh
  135. git-rebase--am.sh
  136. git-rebase--interactive.sh
  137. git-rebase--merge.sh
  138. git-rebase.sh
  139. git-relink.perl
  140. git-remote-testgit.sh
  141. git-remote-testpy.py
  142. git-repack.sh
  143. git-request-pull.sh
  144. git-send-email.perl
  145. git-sh-i18n.sh
  146. git-sh-setup.sh
  147. git-stash.sh
  148. git-submodule.sh
  149. git-svn.perl
  150. GIT-VERSION-GEN
  151. git-web--browse.sh
  152. git.c
  153. git.spec.in
  154. gpg-interface.c
  155. gpg-interface.h
  156. graph.c
  157. graph.h
  158. grep.c
  159. grep.h
  160. hash.c
  161. hash.h
  162. help.c
  163. help.h
  164. hex.c
  165. http-backend.c
  166. http-fetch.c
  167. http-push.c
  168. http-walker.c
  169. http.c
  170. http.h
  171. ident.c
  172. imap-send.c
  173. INSTALL
  174. kwset.c
  175. kwset.h
  176. levenshtein.c
  177. levenshtein.h
  178. LGPL-2.1
  179. line-log.c
  180. line-log.h
  181. line-range.c
  182. line-range.h
  183. list-objects.c
  184. list-objects.h
  185. ll-merge.c
  186. ll-merge.h
  187. lockfile.c
  188. log-tree.c
  189. log-tree.h
  190. mailmap.c
  191. mailmap.h
  192. Makefile
  193. match-trees.c
  194. merge-blobs.c
  195. merge-blobs.h
  196. merge-recursive.c
  197. merge-recursive.h
  198. merge.c
  199. mergesort.c
  200. mergesort.h
  201. name-hash.c
  202. notes-cache.c
  203. notes-cache.h
  204. notes-merge.c
  205. notes-merge.h
  206. notes.c
  207. notes.h
  208. object.c
  209. object.h
  210. pack-check.c
  211. pack-revindex.c
  212. pack-revindex.h
  213. pack-write.c
  214. pack.h
  215. pager.c
  216. parse-options-cb.c
  217. parse-options.c
  218. parse-options.h
  219. patch-delta.c
  220. patch-ids.c
  221. patch-ids.h
  222. path.c
  223. pathspec.c
  224. pathspec.h
  225. pkt-line.c
  226. pkt-line.h
  227. preload-index.c
  228. pretty.c
  229. progress.c
  230. progress.h
  231. prompt.c
  232. prompt.h
  233. quote.c
  234. quote.h
  235. reachable.c
  236. reachable.h
  237. read-cache.c
  238. README
  239. reflog-walk.c
  240. reflog-walk.h
  241. refs.c
  242. refs.h
  243. remote-curl.c
  244. remote-testsvn.c
  245. remote.c
  246. remote.h
  247. replace_object.c
  248. rerere.c
  249. rerere.h
  250. resolve-undo.c
  251. resolve-undo.h
  252. revision.c
  253. revision.h
  254. run-command.c
  255. run-command.h
  256. send-pack.c
  257. send-pack.h
  258. sequencer.c
  259. sequencer.h
  260. server-info.c
  261. setup.c
  262. sh-i18n--envsubst.c
  263. sha1-array.c
  264. sha1-array.h
  265. sha1-lookup.c
  266. sha1-lookup.h
  267. sha1_file.c
  268. sha1_name.c
  269. shallow.c
  270. shell.c
  271. shortlog.h
  272. show-index.c
  273. sideband.c
  274. sideband.h
  275. sigchain.c
  276. sigchain.h
  277. strbuf.c
  278. strbuf.h
  279. streaming.c
  280. streaming.h
  281. string-list.c
  282. string-list.h
  283. submodule.c
  284. submodule.h
  285. symlinks.c
  286. tag.c
  287. tag.h
  288. tar.h
  289. test-chmtime.c
  290. test-ctype.c
  291. test-date.c
  292. test-delta.c
  293. test-dump-cache-tree.c
  294. test-genrandom.c
  295. test-index-version.c
  296. test-line-buffer.c
  297. test-match-trees.c
  298. test-mergesort.c
  299. test-mktemp.c
  300. test-parse-options.c
  301. test-path-utils.c
  302. test-regex.c
  303. test-revision-walking.c
  304. test-run-command.c
  305. test-scrap-cache-tree.c
  306. test-sha1.c
  307. test-sha1.sh
  308. test-sigchain.c
  309. test-string-list.c
  310. test-subprocess.c
  311. test-svn-fe.c
  312. test-wildmatch.c
  313. thread-utils.c
  314. thread-utils.h
  315. trace.c
  316. transport-helper.c
  317. transport.c
  318. transport.h
  319. tree-diff.c
  320. tree-walk.c
  321. tree-walk.h
  322. tree.c
  323. tree.h
  324. unimplemented.sh
  325. unix-socket.c
  326. unix-socket.h
  327. unpack-trees.c
  328. unpack-trees.h
  329. upload-pack.c
  330. url.c
  331. url.h
  332. usage.c
  333. userdiff.c
  334. userdiff.h
  335. utf8.c
  336. utf8.h
  337. varint.c
  338. varint.h
  339. version.c
  340. version.h
  341. walker.c
  342. walker.h
  343. wildmatch.c
  344. wildmatch.h
  345. wrap-for-bin.sh
  346. wrapper.c
  347. write_or_die.c
  348. ws.c
  349. wt-status.c
  350. wt-status.h
  351. xdiff-interface.c
  352. xdiff-interface.h
  353. zlib.c