aboutsummaryrefslogtreecommitdiffstats
path: root/diff.h
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2024-10-03 17:06:54 -0400
committerJunio C Hamano <gitster@pobox.com>2024-10-03 14:22:21 -0700
commit2011bb4f34d773a7de2d64769ca9f508feba8089 (patch)
tree167ea1dd2f768516be0329a0bf5210f2081a5af4 /diff.h
parentline-log: use diff_line_prefix() instead of custom helper (diff)
downloadgit-2011bb4f34d773a7de2d64769ca9f508feba8089.tar.gz
git-2011bb4f34d773a7de2d64769ca9f508feba8089.zip
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>
Diffstat (limited to 'diff.h')
-rw-r--r--diff.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/diff.h b/diff.h
index 9901c8ca8c..f816d3b12b 100644
--- a/diff.h
+++ b/diff.h
@@ -274,7 +274,6 @@ struct diff_options {
const char *single_follow;
const char *a_prefix, *b_prefix;
const char *line_prefix;
- size_t line_prefix_length;
/**
* collection of boolean options that affects the operation, but some do