Skip to content

Commit b502a64

Browse files
Unique-Usmangitster
authored andcommitted
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 <[email protected]> Mentored-by: Christian Couder <[email protected]> Signed-off-by: Usman Akinyemi <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2e4e439 commit b502a64

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

builtin/difftool.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -750,8 +750,7 @@ int cmd_difftool(int argc,
750750
};
751751
struct child_process child = CHILD_PROCESS_INIT;
752752

753-
if (repo)
754-
repo_config(repo, difftool_config, &dt_options);
753+
repo_config(repo, difftool_config, &dt_options);
755754
dt_options.symlinks = dt_options.has_symlinks;
756755

757756
argc = parse_options(argc, argv, prefix, builtin_difftool_options,

0 commit comments

Comments
 (0)