Skip to content

Commit

Permalink
builtin/verify-commit.c: Init dynamically via C++
Browse files Browse the repository at this point in the history
  • Loading branch information
jjuran committed Apr 30, 2024
1 parent a82d1aa commit c816631
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions builtin/verify-commit.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,20 @@ static int git_verify_commit_config(const char *var, const char *value, void *cb

int cmd_verify_commit(int argc, const char **argv, const char *prefix)
{
#ifdef USE_CPLUSPLUS_FOR_INIT
#pragma cplusplus on
#endif

int i = 1, verbose = 0, had_error = 0;
const struct option verify_commit_options[] = {
OPT__VERBOSE(&verbose, N_("print commit contents")),
OPT_END()
};

#ifdef USE_CPLUSPLUS_FOR_INIT
#pragma cplusplus reset
#endif

git_config(git_verify_commit_config, NULL);

argc = parse_options(argc, argv, prefix, verify_commit_options,
Expand Down

0 comments on commit c816631

Please sign in to comment.