summaryrefslogtreecommitdiff
path: root/levenshtein.h
diff options
context:
space:
mode:
authorLibravatar René Scharfe <l.s.r@web.de>2013-08-05 17:21:17 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-08-05 10:43:28 -0700
commit3a4fc21a293c2426899df6a8f4a4cf77b3a0642d (patch)
treeba1b93671efe5616ebf530be677d75da32957de4 /levenshtein.h
parentblame-options.txt: explain that -L <start> and <end> are optional (diff)
downloadtgif-3a4fc21a293c2426899df6a8f4a4cf77b3a0642d.tar.xz
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>
Diffstat (limited to 'levenshtein.h')
0 files changed, 0 insertions, 0 deletions