diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-07-08 20:15:04 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-07-08 20:15:04 (GMT) |
commit | e867110340c236d2ba977d2c4bf1274a297f4e21 (patch) | |
tree | 9fbb0b5d2dd64c2753d1232ff23fe776c862703f /builtin/difftool.c | |
parent | 11819cb74123efd1102a4c7f482ce8620a9bd674 (diff) | |
parent | 338abb0f045b87df5e628543800e74dec0e72cdf (diff) | |
download | git-e867110340c236d2ba977d2c4bf1274a297f4e21.zip git-e867110340c236d2ba977d2c4bf1274a297f4e21.tar.gz git-e867110340c236d2ba977d2c4bf1274a297f4e21.tar.bz2 |
Merge branch 'ab/cmd-foo-should-return'
Code clean-up.
* ab/cmd-foo-should-return:
builtins + test helpers: use return instead of exit() in cmd_*
Diffstat (limited to 'builtin/difftool.c')
-rw-r--r-- | builtin/difftool.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/builtin/difftool.c b/builtin/difftool.c index 89334b7..6a9242a 100644 --- a/builtin/difftool.c +++ b/builtin/difftool.c @@ -675,7 +675,7 @@ static int run_file_diff(int prompt, const char *prefix, "GIT_PAGER=", "GIT_EXTERNAL_DIFF=git-difftool--helper", NULL, NULL }; - int ret = 0, i; + int i; if (prompt > 0) env[2] = "GIT_DIFFTOOL_PROMPT=true"; @@ -686,8 +686,7 @@ static int run_file_diff(int prompt, const char *prefix, strvec_push(&args, "diff"); for (i = 0; i < argc; i++) strvec_push(&args, argv[i]); - ret = run_command_v_opt_cd_env(args.v, RUN_GIT_CMD, prefix, env); - exit(ret); + return run_command_v_opt_cd_env(args.v, RUN_GIT_CMD, prefix, env); } int cmd_difftool(int argc, const char **argv, const char *prefix) |