@@ -97,7 +97,7 @@ static void setup_environment(LPWSTR exepath)
97
97
* untouched.
98
98
*/
99
99
static LPWSTR fixup_commandline (LPWSTR exepath , LPWSTR * exep , int * wait ,
100
- LPWSTR builtin , int builtin_len )
100
+ LPWSTR prefix_args , int prefix_args_len )
101
101
{
102
102
int wargc = 0 , gui = 0 ;
103
103
LPWSTR cmd = NULL , cmdline = NULL ;
@@ -106,7 +106,7 @@ static LPWSTR fixup_commandline(LPWSTR exepath, LPWSTR *exep, int *wait,
106
106
cmdline = GetCommandLine ();
107
107
wargv = CommandLineToArgvW (cmdline , & wargc );
108
108
cmd = (LPWSTR )malloc (sizeof (WCHAR ) *
109
- (wcslen (cmdline ) + builtin_len + 1 + MAX_PATH ));
109
+ (wcslen (cmdline ) + prefix_args_len + 1 + MAX_PATH ));
110
110
if (wargc > 1 && wcsicmp (L"gui" , wargv [1 ]) == 0 ) {
111
111
* wait = 0 ;
112
112
if (wargc > 2 && wcsicmp (L"citool" , wargv [2 ]) == 0 ) {
@@ -127,9 +127,9 @@ static LPWSTR fixup_commandline(LPWSTR exepath, LPWSTR *exep, int *wait,
127
127
* exep = NULL ;
128
128
}
129
129
}
130
- else if (builtin )
130
+ else if (prefix_args )
131
131
_swprintf (cmd , L"%s\\%s %.*s" ,
132
- exepath , L"git.exe" , builtin_len , builtin );
132
+ exepath , L"git.exe" , prefix_args_len , prefix_args );
133
133
else
134
134
wcscpy (cmd , L"git.exe" );
135
135
@@ -151,9 +151,9 @@ static LPWSTR fixup_commandline(LPWSTR exepath, LPWSTR *exep, int *wait,
151
151
152
152
int main (void )
153
153
{
154
- int r = 1 , wait = 1 , builtin_len = -1 ;
154
+ int r = 1 , wait = 1 , prefix_args_len = -1 ;
155
155
WCHAR exepath [MAX_PATH ], exe [MAX_PATH ];
156
- LPWSTR cmd = NULL , exep = exe , builtin = NULL , basename ;
156
+ LPWSTR cmd = NULL , exep = exe , prefix_args = NULL , basename ;
157
157
UINT codepage = 0 ;
158
158
159
159
/* get the installation location */
@@ -165,10 +165,10 @@ int main(void)
165
165
basename = exepath + wcslen (exepath ) + 1 ;
166
166
if (!wcsncmp (basename , L"git-" , 4 )) {
167
167
/* Call a builtin */
168
- builtin = basename + 4 ;
169
- builtin_len = wcslen (builtin );
170
- if (!wcscmp (builtin + builtin_len - 4 , L".exe" ))
171
- builtin_len -= 4 ;
168
+ prefix_args = basename + 4 ;
169
+ prefix_args_len = wcslen (prefix_args );
170
+ if (!wcscmp (prefix_args + prefix_args_len - 4 , L".exe" ))
171
+ prefix_args_len -= 4 ;
172
172
173
173
/* set the default exe module */
174
174
wcscpy (exe , exepath );
@@ -186,9 +186,10 @@ int main(void)
186
186
PathAppend (exe , L"bin\\git.exe" );
187
187
}
188
188
189
- if (!builtin )
189
+ if (!prefix_args )
190
190
setup_environment (exepath );
191
- cmd = fixup_commandline (exepath , & exep , & wait , builtin , builtin_len );
191
+ cmd = fixup_commandline (exepath , & exep , & wait ,
192
+ prefix_args , prefix_args_len );
192
193
193
194
/* set the console to ANSI/GUI codepage */
194
195
codepage = GetConsoleCP ();
0 commit comments