Commit d3cc5f4
show-branch: use skip_prefix to drop magic numbers
We make several starts_with() calls, only to advance
pointers. This is exactly what skip_prefix() is for, which
lets us avoid manually-counted magic numbers.
Helped-by: Pranit Bauva <pranit.bauva@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent d9e557a commit d3cc5f4
1 file changed
Lines changed: 8 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
278 | | - | |
279 | | - | |
| 278 | + | |
280 | 279 | | |
281 | 280 | | |
282 | 281 | | |
| |||
470 | 469 | | |
471 | 470 | | |
472 | 471 | | |
473 | | - | |
| 472 | + | |
474 | 473 | | |
475 | 474 | | |
476 | 475 | | |
477 | 476 | | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
484 | 480 | | |
485 | 481 | | |
486 | 482 | | |
| |||
799 | 795 | | |
800 | 796 | | |
801 | 797 | | |
802 | | - | |
803 | | - | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
804 | 801 | | |
805 | 802 | | |
806 | 803 | | |
| |||
0 commit comments