Re: [PATCH 2/2] git status: show relative paths when run in a subdirectory
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> -static const char *quote_crlf(const char *in, char *buf, size_t sz)
> +static const char *quote_crlf(const char *in, int len, char *buf, size_t sz,
> + const char *prefix)
> {This is not quote_*crlf* anymore.
Show 8 quoted lines
> @@ -118,8 +150,8 @@ static void wt_status_print_filepair(struct wt_status *s,
> const char *one, *two;
> char onebuf[PATH_MAX], twobuf[PATH_MAX];
>
> - one = quote_crlf(p->one->path, onebuf, sizeof(onebuf));
> - two = quote_crlf(p->two->path, twobuf, sizeof(twobuf));
> + one = quote_crlf(p->one->path, -1, onebuf, sizeof(onebuf), s->prefix);
> + two = quote_crlf(p->two->path, -1, twobuf, sizeof(twobuf), s->prefix);
I wonder if it makes more sense to use strbuf here...