Commit 2011bb4
diff: drop line_prefix_length field
The diff_options structure holds a line_prefix string and an associated
length. But the length is always just the strlen() of the NUL-terminated
string. Let's simplify the code by just storing the string pointer and
assuming it is NUL-terminated when we use it.
This will cause us to compute the string length in a few extra spots,
but I don't think any of these are particularly hot code paths.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 8aeff2c commit 2011bb4
3 files changed
+2
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5395 | 5395 | | |
5396 | 5396 | | |
5397 | 5397 | | |
5398 | | - | |
5399 | 5398 | | |
5400 | 5399 | | |
5401 | 5400 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
277 | | - | |
278 | 277 | | |
279 | 278 | | |
280 | 279 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
| 77 | + | |
81 | 78 | | |
82 | 79 | | |
83 | 80 | | |
| |||
321 | 318 | | |
322 | 319 | | |
323 | 320 | | |
324 | | - | |
325 | | - | |
| 321 | + | |
326 | 322 | | |
327 | 323 | | |
328 | 324 | | |
| |||
0 commit comments