submodule--helper: prefer strip_suffix() to ends_with()
authorJeff King <redacted>
Mon, 12 Nov 2018 14:47:04 +0000 (09:47 -0500)
committerJunio C Hamano <redacted>
Tue, 13 Nov 2018 05:22:02 +0000 (14:22 +0900)
commitb2ac148faecc95243ed8da0b75f63966d828c802
tree849818368e72e1a7a3f8130c01620d9a9cee4753
parent4d0984bebc5fc5662d2891ee41f7d49c32488744
submodule--helper: prefer strip_suffix() to ends_with()

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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
builtin/submodule--helper.c
git clone https://git.99rst.org/PROJECT