From: Junio C Hamano Date: Fri, 27 Jun 2008 22:34:07 GMT Subject: Re: [PATCH] shrink git-shell by avoiding redundant dependencies Message-ID: <7v1w2ipkww.fsf@gitster.siamese.dyndns.org> In-Reply-To: <20080627223107.GH5737@dpotapov.dyndns.org> Dmitry Potapov writes: > On Fri, Jun 27, 2008 at 02:55:32PM -0700, Junio C Hamano wrote: >> Dmitry Potapov writes: >> >> > diff --git a/abspath.c b/abspath.c >> > new file mode 100644 >> > index 0000000..4becedf >> > --- /dev/null >> > +++ b/abspath.c >> > @@ -0,0 +1,80 @@ >> > +/* >> > + * I'm tired of doing "vsnprintf()" etc just to open a >> > + * file, so here's a "return static buffer with printf" >> > + * interface for paths. >> > + * >> > + * It's obviously not thread-safe. Sue me. But it's quite >> > + * useful for doing things like >> > + * >> > + * f = open(mkpath("%s/%s.git", base, name), O_RDONLY); >> > + * >> > + * which is what it's designed for. >> > + */ >> >> This is not a comment you would want to move to the resulting file that >> contains only make_absolute_path(). > > I am sorry... I removed this comment. Here is the corrected patch. No need to say nor be sorry. The rest looks sane from a quick glance, except that we may want to have a separate clean-up patch that consolidates MAXDEPTH in many places that limits our manual symlink resolution.