From: Junio C Hamano Date: Thu, 08 Nov 2007 08:26:16 GMT Subject: Re: [PATCH 2/2] git status: show relative paths when run in a subdirectory Message-ID: <7v8x593zyv.fsf@gitster.siamese.dyndns.org> In-Reply-To: Johannes Schindelin 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. > @@ -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...