Commit b2ac148
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 <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 4d0984b commit b2ac148
1 file changed
+4
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1268 | 1268 | | |
1269 | 1269 | | |
1270 | 1270 | | |
| 1271 | + | |
1271 | 1272 | | |
1272 | 1273 | | |
1273 | 1274 | | |
1274 | 1275 | | |
1275 | 1276 | | |
1276 | | - | |
| 1277 | + | |
1277 | 1278 | | |
1278 | 1279 | | |
1279 | 1280 | | |
1280 | | - | |
| 1281 | + | |
1281 | 1282 | | |
1282 | 1283 | | |
1283 | 1284 | | |
1284 | 1285 | | |
1285 | 1286 | | |
1286 | 1287 | | |
1287 | 1288 | | |
1288 | | - | |
| 1289 | + | |
1289 | 1290 | | |
1290 | 1291 | | |
1291 | 1292 | | |
| |||
0 commit comments