Skip to content

Commit cce755a

Browse files
Properly load the config for the unit tests
1 parent 5964b51 commit cce755a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

diff-so-fancy

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -616,13 +616,12 @@ sub is_windows {
616616

617617
# Return value is whether this is the first time they've run d-s-f
618618
sub check_first_run {
619-
my $i = git_config();
620619
my $ret = 0;
621620

622621
# If first-run is not set, or it's set to "true"
623-
my $first_run = git_config_boolean($i->{'diff-so-fancy'}->{'first-run'});
622+
my $first_run = git_config_boolean('diff-so-fancy.first-run');
624623
# See if they're previously set SOME diff-highlight colors
625-
my $has_dh_colors = boolean($i->{'color.diff-highlight.oldnormal'} || $i->{'color.diff-highlight.newnormal'});
624+
my $has_dh_colors = git_config_boolean($i->{'color.diff-highlight.oldnormal'}) || git_config_boolean($i->{'color.diff-highlight.newnormal'});
626625

627626
if (!$first_run || $has_dh_colors) {
628627
return 0;

0 commit comments

Comments
 (0)