Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/diff.h
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2022-12-02 01:53:17 +0300
committerJunio C Hamano <gitster@pobox.com>2022-12-02 02:25:30 +0300
commit189e97bc4ba8d5f2ab4746d41204feed159fbe9a (patch)
tree21ac76b1ea677686d215abcc3f17bcd58455ad92 /diff.h
parent6c6048fa7f1cf7b9ae79beb0f57fd03dd4021bb4 (diff)
diff: remove parseopts member from struct diff_options
repo_diff_setup() builds the struct option array with git diff's command line options and stores a pointer to it in the parseopts member of struct diff_options. The array is freed by diff_setup_done(), but not by release_revisions(). Thus calling only repo_diff_setup() and release_revisions() leaks that array. We could free it in release_revisions() as well to plug that leak, but there is a better way: Only build it when needed. Absorb prep_parse_options() into the last place that uses the parseopts member of struct diff_options, add_diff_parseopts(), and get rid of said member. Signed-off-by: René Scharfe <l.s.r@web.de> 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 5229f20486..6840499844 100644
--- a/diff.h
+++ b/diff.h
@@ -394,7 +394,6 @@ struct diff_options {
unsigned color_moved_ws_handling;
struct repository *repo;
- struct option *parseopts;
struct strmap *additional_path_headers;
int no_free;