From: Junio C Hamano Date: Tue, 25 Aug 2026 19:31:45 GMT Subject: Re: [GSoC Patch v5 7/7] repo: add path.cdup Message-ID: In-Reply-To: <20260825175818.645579-8-jayatheerthkulkarni2005@gmail.com> K Jayatheerth writes: > +static int get_path_cdup(struct repository *repo, struct strbuf *buf) > +{ > + const char *pfx = repo->prefix; > + > + while (pfx) { > + pfx = strchr(pfx, '/'); > + if (pfx) { > + pfx++; > + strbuf_addstr(buf, "../"); > + } > + } > + return 0; > +} Can we have a small common helper library (e.g., repo-info.c at the top level) shared between this code and builtin/rev-parse.c so that we have only a single implementation of 'cdup'? The same comment applies to all the other features that duplicate implementations from rev-parse and elsewhere in the repo-info file.