git-cvsserver runs hooks/post-receive
[gitweb.git] / wt-status.c
index 0e0439f2c2d8f19abba0a683ce1b2ab3db6197ba..d35386dae19287a28ef7086d886bdfb3941d18b1 100644 (file)
@@ -82,12 +82,13 @@ static void wt_status_print_trailer(struct wt_status *s)
 }
 
 static char *quote_path(const char *in, int len,
-               struct strbuf *out, const char *prefix)
+                       struct strbuf *out, const char *prefix)
 {
-       if (len > 0)
-               strbuf_grow(out, len);
-       strbuf_setlen(out, 0);
+       if (len < 0)
+               len = strlen(in);
 
+       strbuf_grow(out, len);
+       strbuf_setlen(out, 0);
        if (prefix) {
                int off = 0;
                while (prefix[off] && off < len && prefix[off] == in[off])
@@ -104,7 +105,7 @@ static char *quote_path(const char *in, int len,
                                strbuf_addstr(out, "../");
        }
 
-       for (; (len < 0 && *in) || len > 0; in++, len--) {
+       for ( ; len > 0; in++, len--) {
                int ch = *in;
 
                switch (ch) {
@@ -250,6 +251,7 @@ static void wt_status_print_updated(struct wt_status *s)
        rev.diffopt.format_callback_data = s;
        rev.diffopt.detect_rename = 1;
        rev.diffopt.rename_limit = 100;
+       rev.diffopt.break_opt = 0;
        wt_read_cache(s);
        run_diff_index(&rev, 1);
 }