From 8650eae6ad5dedd23ac1aa4f6a12369bab40ab92 Mon Sep 17 00:00:00 2001 From: map588 Date: Sun, 22 Mar 2026 20:30:50 -0400 Subject: [PATCH] Fix -Werror build failure from GIT_DIFF_OPTIONS_INIT macro Replace compile-time GIT_DIFF_OPTIONS_INIT struct initializer with runtime git_diff_options_init() call. The macro triggers -Wmissing-field-initializers when libgit2 has more fields than the macro accounts for, which becomes a hard error under -Werror. --- src/pipeline/pass_githistory.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pipeline/pass_githistory.c b/src/pipeline/pass_githistory.c index 7a035043..95112d29 100644 --- a/src/pipeline/pass_githistory.c +++ b/src/pipeline/pass_githistory.c @@ -168,7 +168,8 @@ static int parse_git_log(const char *repo_path, commit_t **out, int *out_count) /* Diff parent_tree → tree to find changed files */ git_diff *diff = NULL; - git_diff_options diff_opts = GIT_DIFF_OPTIONS_INIT; + git_diff_options diff_opts; + git_diff_options_init(&diff_opts, GIT_DIFF_OPTIONS_VERSION); if (git_diff_tree_to_tree(&diff, repo, parent_tree, tree, &diff_opts) == 0) { commit_t current = {0};