Skip to content

Commit b351a65

Browse files
committed
git-wrapper: serve as git-gui.exe, too
To avoid that ugly Console window when calling \cmd\git.exe gui... Signed-off-by: Johannes Schindelin <[email protected]>
1 parent fa34d4d commit b351a65

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

compat/win32/git-wrapper.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,8 @@ int main(void)
336336
PathAppend(exe, L"bin\\git.exe");
337337
}
338338
}
339-
else if (!wcscmp(basename, L"gitk.exe")) {
339+
else if (!wcscmp(basename, L"gitk.exe") ||
340+
!wcscmp(basename, L"git-gui.exe")) {
340341
static WCHAR buffer[BUFSIZE];
341342
if (!PathRemoveFileSpec(exepath)) {
342343
fwprintf(stderr,
@@ -356,7 +357,8 @@ int main(void)
356357
PathAppend(exe, L"mingw\\bin\\wish.exe");
357358
PathAppend(buffer, L"mingw\\bin");
358359
}
359-
PathAppend(buffer, L"gitk");
360+
basename[wcslen(basename) - 4] = '\0';
361+
PathAppend(buffer, basename);
360362
prefix_args = buffer;
361363
prefix_args_len = wcslen(buffer);
362364
}

0 commit comments

Comments
 (0)