File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ sub generate_command
52
52
my @command = (exe(' git' ), ' diff' );
53
53
my $skip_next = 0;
54
54
my $idx = -1;
55
+ my $prompt = ' ' ;
55
56
for my $arg (@ARGV ) {
56
57
$idx ++;
57
58
if ($skip_next ) {
@@ -89,20 +90,23 @@ sub generate_command
89
90
next ;
90
91
}
91
92
if ($arg eq ' -y' || $arg eq ' --no-prompt' ) {
92
- $ENV {GIT_DIFFTOOL_NO_PROMPT } = ' true' ;
93
- delete $ENV {GIT_DIFFTOOL_PROMPT };
93
+ $prompt = ' no' ;
94
94
next ;
95
95
}
96
96
if ($arg eq ' --prompt' ) {
97
- $ENV {GIT_DIFFTOOL_PROMPT } = ' true' ;
98
- delete $ENV {GIT_DIFFTOOL_NO_PROMPT };
97
+ $prompt = ' yes' ;
99
98
next ;
100
99
}
101
100
if ($arg eq ' -h' || $arg eq ' --help' ) {
102
101
usage();
103
102
}
104
103
push @command , $arg ;
105
104
}
105
+ if ($prompt eq ' yes' ) {
106
+ $ENV {GIT_DIFFTOOL_PROMPT } = ' true' ;
107
+ } elsif ($prompt eq ' no' ) {
108
+ $ENV {GIT_DIFFTOOL_NO_PROMPT } = ' true' ;
109
+ }
106
110
return @command
107
111
}
108
112
You can’t perform that action at this time.
0 commit comments