diff options
| author | Usman Akinyemi <usmanakinyemi202@gmail.com> | 2025-04-20 08:24:33 +0530 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-04-20 14:17:22 -0700 |
| commit | b502a648ef185e7e24ef80097330c44cca510264 (patch) | |
| tree | 3566827177e9a2ee3bd410f9b7c33e95a4d5c178 | |
| parent | builtin/add: remove unnecessary if statement (diff) | |
| download | git-b502a648ef185e7e24ef80097330c44cca510264.tar.gz git-b502a648ef185e7e24ef80097330c44cca510264.zip | |
builtin/difftool: remove unnecessary if statement
Since we already teach the `repo_config()` in "f29f1990b5
(config: teach repo_config to allow `repo` to be NULL, 2025-03-08)"
to allow `repo` to be NULL, no need to check if `repo` is NULL
before calling `repo_config()`.
Suggested-by: Patrick Steinhardt <ps@pks.im>
Mentored-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
| -rw-r--r-- | builtin/difftool.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin/difftool.c b/builtin/difftool.c index 41cd00066c..c7348a1dca 100644 --- a/builtin/difftool.c +++ b/builtin/difftool.c @@ -750,8 +750,7 @@ int cmd_difftool(int argc, }; struct child_process child = CHILD_PROCESS_INIT; - if (repo) - repo_config(repo, difftool_config, &dt_options); + repo_config(repo, difftool_config, &dt_options); dt_options.symlinks = dt_options.has_symlinks; argc = parse_options(argc, argv, prefix, builtin_difftool_options, |
