glossary: more precise definition of tree-ish (a.k.a. treeish)
[gitweb.git] / quote.c
diff --git a/quote.c b/quote.c
index 64ff3441585780434b7de36ae06a1ce8aa35f44b..5c8808160e700af0c055a84f8527eb3ac76962d9 100644 (file)
--- a/quote.c
+++ b/quote.c
@@ -312,8 +312,7 @@ void write_name_quotedpfx(const char *pfx, size_t pfxlen,
        fputc(terminator, fp);
 }
 
-void write_name_quoted_relative(const char *name, size_t len,
-                               const char *prefix, size_t prefix_len,
+void write_name_quoted_relative(const char *name, const char *prefix,
                                FILE *fp, int terminator)
 {
        struct strbuf sb = STRBUF_INIT;
@@ -325,8 +324,8 @@ void write_name_quoted_relative(const char *name, size_t len,
 }
 
 /* quote path as relative to the given prefix */
-char *quote_path_relative(const char *in, int len,
-                         struct strbuf *out, const char *prefix)
+char *quote_path_relative(const char *in, const char *prefix,
+                         struct strbuf *out)
 {
        struct strbuf sb = STRBUF_INIT;
        const char *rel = relative_path(in, prefix, &sb);
@@ -334,9 +333,6 @@ char *quote_path_relative(const char *in, int len,
        quote_c_style_counted(rel, strlen(rel), out, NULL, 0);
        strbuf_release(&sb);
 
-       if (!out->len)
-               strbuf_addstr(out, "./");
-
        return out->buf;
 }