aboutsummaryrefslogtreecommitdiffstats
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-12-19 11:46:17 +0900
committerJunio C Hamano <gitster@pobox.com>2022-12-19 11:46:17 +0900
commitab91f6b7c42531406bcca0e48c48530126332142 (patch)
tree3c77c78905448b44d73eda58d5157156cc669433 /builtin
parentMerge branch 'jk/avoid-redef-system-functions' (diff)
parentdiff: remove parseopts member from struct diff_options (diff)
downloadgit-ab91f6b7c42531406bcca0e48c48530126332142.tar.gz
git-ab91f6b7c42531406bcca0e48c48530126332142.zip
Merge branch 'rs/diff-parseopts'
The way the diff machinery prepares the options array for the parse_options API has been refactored to avoid resource leaks. * rs/diff-parseopts: diff: remove parseopts member from struct diff_options diff: use add_diff_options() in diff_opt_parse() diff: factor out add_diff_options()
Diffstat (limited to 'builtin')
-rw-r--r--builtin/range-diff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/range-diff.c b/builtin/range-diff.c
index e2a74efb42..aecfae12d3 100644
--- a/builtin/range-diff.c
+++ b/builtin/range-diff.c
@@ -47,7 +47,7 @@ int cmd_range_diff(int argc, const char **argv, const char *prefix)
repo_diff_setup(the_repository, &diffopt);
- options = parse_options_concat(range_diff_options, diffopt.parseopts);
+ options = add_diff_options(range_diff_options, &diffopt);
argc = parse_options(argc, argv, prefix, options,
builtin_range_diff_usage, PARSE_OPT_KEEP_DASHDASH);