Re: [PATCH 2/9] submodule--helper: prefer strip_suffix() to ends_with()
- From
Stefan Beller <sbeller@google.com>
- Date
- Nov 12, 2018, 18:23 UTC
- Message-ID
- <CAGZ79kb7MtM8iQ1b-t-NGOa_s7v1ZoaM4xHcHQZ0dyMrNWdw0A@mail.gmail.com>
- In-Reply-To
- <20181112144703.GB7400@sigill.intra.peff.net>
On Mon, Nov 12, 2018 at 6:47 AM Jeff King <peff@peff.net> wrote:
Show 7 quoted lines
> > Using strip_suffix() lets us avoid repeating ourselves. It also makes > the handling of "/" a bit less subtle (we strip one less character than > we matched in order to leave it in place, but we can just as easily > include the "/" when we add more path components). > > Signed-off-by: Jeff King <peff@peff.net>
This makes sense. Thanks!
(This patch caught my attention as it's a submodule thing, but now looking at the rest of the series)