Re: [PATCH 2/9] submodule--helper: prefer strip_suffix() to ends_with()

2018-11-12 Thread Stefan Beller
On Mon, Nov 12, 2018 at 6:47 AM Jeff King wrote: > > 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

[PATCH 2/9] submodule--helper: prefer strip_suffix() to ends_with()

2018-11-12 Thread Jeff King
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 ---