Commit 881529c
apply: remove prefix_length member from apply_state
Use a NULL-and-NUL check to see if we have a prefix and consistently use
C string functions on it instead of storing its length in a member of
struct apply_state. This avoids strlen() calls and simplifies the code.
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 95d6787 commit 881529c
2 files changed
Lines changed: 5 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
83 | 82 | | |
84 | 83 | | |
85 | 84 | | |
| |||
795 | 794 | | |
796 | 795 | | |
797 | 796 | | |
798 | | - | |
| 797 | + | |
799 | 798 | | |
800 | 799 | | |
801 | 800 | | |
802 | | - | |
| 801 | + | |
803 | 802 | | |
804 | 803 | | |
805 | 804 | | |
| |||
2078 | 2077 | | |
2079 | 2078 | | |
2080 | 2079 | | |
2081 | | - | |
2082 | | - | |
2083 | | - | |
2084 | | - | |
| 2080 | + | |
| 2081 | + | |
| 2082 | + | |
2085 | 2083 | | |
2086 | 2084 | | |
2087 | 2085 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
| |||
0 commit comments