]> git.cameronkatri.com Git - cgit.git/commitdiff
Merge branch 'stable'
authorLars Hjemli <hjemli@gmail.com>
Tue, 6 Jan 2009 20:51:09 +0000 (21:51 +0100)
committerLars Hjemli <hjemli@gmail.com>
Tue, 6 Jan 2009 20:51:09 +0000 (21:51 +0100)
tests/t0104-tree.sh
ui-tree.c

index 0d62cc82c5d5dbbc90e351a73e3c748e427ba7c0..33f4eb00ff2808e9f4335b397e809d695b464301 100755 (executable)
@@ -15,7 +15,7 @@ run_test 'find line 1' '
 '
 
 run_test 'no line 2' '
-       grep -e "<a id=.n2. name=.n2. href=.#n2.>2</a>" trash/tmp
+       grep -e "<a id=.n2. name=.n2. href=.#n2.>2</a>" trash/tmp
 '
 
 run_test 'generate foo+bar/tree' 'cgit_url "foo%2bbar/tree" >trash/tmp'
index 051db7cb28cbf2321ca67582aac866596743a465..9876c9972e9558f82632d03280997cc8db234fac 100644 (file)
--- a/ui-tree.c
+++ b/ui-tree.c
@@ -54,8 +54,10 @@ static void print_object(const unsigned char *sha1, char *path)
                }
                idx++;
        }
-       htmlf(linefmt, ++lineno);
-       html_txt(buf + start);
+       if (start < idx) {
+               htmlf(linefmt, ++lineno);
+               html_txt(buf + start);
+       }
        html("</td></tr>\n");
        html("</table>\n");
 }