]> git.ipfire.org Git - thirdparty/git.git/commit
diff: drop line_prefix_length field
authorJeff King <peff@peff.net>
Thu, 3 Oct 2024 21:06:54 +0000 (17:06 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 3 Oct 2024 21:22:21 +0000 (14:22 -0700)
commit2011bb4f34d773a7de2d64769ca9f508feba8089
tree167ea1dd2f768516be0329a0bf5210f2081a5af4
parent8aeff2c287aea1a8673d78574a5709510a789640
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>
diff.c
diff.h
graph.c